before you begin, have a quick look at the opensolaris MYSQL AMI(Amazon Machine Images) catalog
Launch OpenSolaris MySQL 5 AMI
-bash # ec2-run-instances ami-63ce2a0a -k your-keypair
get the public DNS name associated with the instance
-bash # ec2-describe-instances i-xxxxxxxx
if the instance is in the creation or booting up phase, you may see
‘Pending’ in place of address.
Once the instance is up and running you will get the public DNS name
which should look like as ec2-xx-xxx-xx-xx.compute-1.amazonaws.com
login into the instancce with the your keypair
ssh -i <your keypair file path>
The first step to start MySQL server.
To do this, “su – mysql” and type “mysqld &” and “exit”
-bash # su – mysql
if you have changed the original my.conf file (/etc/my.cnf) make sure
that there is no “skip-networking” option in this file.
test if mysql is listening to external connections on the port 3306
-bash # netstat -a | grep -i 3306
49152 0 LISTEN
Login into mysql database with root user
-bash # su – mysql
-bash # mysql -u root -p
Execute this query to grant access to external remote host for
administering mysql databases.
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,
INDEX,ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO ‘root’@’%’
IDENTIFIED BY ‘password’;
Query OK, 0 rows affected (0.00 sec)
here ‘%; is the wild card character and used for any remote
host. (if you want to give access to specific remote host, we can
replace it with host address) and ‘password’ is the password you want
to set for the remote host which needs to be provided to make
Open “MySQL Administrator” tool.
Provide follwing details to connect to the instance
Server Hostname: ec2-xx-xxx-xx-xx.compute-1.amazonaws.com
click on the connect and you are ready to administer mysql server
running on ec2 instance with mysql administrator tool.