This forum is no longer active. Please post your questions to our new community site

Forums LAMPStack

mysql restart

Subscribe to mysql restart 6 post(s), 2 voice(s)

 
Avatar b1ueskyz 3 post(s)

I needed to change the value of a system variable in mysql and now need to restart mysqld. None of the commands I’ve found, work. I’m running on a bitnami LAMP stack on Amazon EC2.

Any suggestions?

Thx.
-Phil

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi Phil,

Log in the Amazon EC2 machine and run the following commands:

$ cd /opt/bitnami
$ sudo ./ctlscript.sh restart mysql

The default password is “bitnami”. I hope it helps.

 
Avatar b1ueskyz 3 post(s)

Nope… this is what I got back even though mysql was running:

/opt/bitnami/mysql/scripts/ctl.sh : mysql not running
100902 20:52:14 mysqld_safe Logging to ‘/opt/bitnami/mysql/data/mysqld.log’.
100902 20:52:15 mysqld_safe Starting mysqld.bin daemon with databases from /opt/bitnami/mysql/data

fg
100902 20:53:55 mysqld_safe mysqld from pid file /opt/bitnami/mysql/data/domU-12-31-39-04-50-46.pid ended
/opt/bitnami/mysql/scripts/ctl.sh : mysql could not be started

And now I get this:

root@domU-12-31-39-04-50-46:/opt/bitnami# /opt/bitnami/mysql/bin/mysqladmin status
/opt/bitnami/mysql/bin/mysqladmin.bin: connect to server at ‘localhost’ failed
error: ’Can’t connect to local MySQL server through socket ‘/opt/bitnami/mysql/tmp/mysql.sock’ (2)’
Check that mysqld is running and that the socket: ‘/opt/bitnami/mysql/tmp/mysql.sock’ exists!

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Have you installed another MySQL database? Could you try to see if there is any remaining procress “ps aux | grep mysql” ? Try the following:

# /opt/bitnami/ctlscript.sh status

 
Avatar b1ueskyz 3 post(s)

Here’s what I get. Formats better outside of this posting area.

root:~# /opt/bitnami/ctlscript.sh status
apache already running
mysql already running

root:~# ps aux | grep mysql
root 1836 0.0 0.0 1884 552 ? S Sep02 0:00 /bin/sh /opt/bitnami/mysql/bin/mysqld_safe —defaults-file=/opt/bitnami/mysql/my.cnf —port=3306 —socket=/opt/bitnami/mysql/tmp/mysql.sock —old-passwords —datadir=/opt/bitnami/mysql/data —log-error=/opt/bitnami/mysql/data/mysqld.log —pid-file=/opt/bitnami/mysql/data/domU-12-31-38-04-64-E4.pid —lower-case-table-names=1 —default-table-type=InnoDB
mysql 1944 0.0 1.1 105240 19836 ? Sl Sep02 12:08 /opt/bitnami/mysql/bin/mysqld.bin —defaults-file=/opt/bitnami/mysql/my.cnf —basedir=/opt/bitnami/mysql —datadir=/opt/bitnami/mysql/data —user=mysql —old-passwords —lower-case-table-names=1 —default-table-type=InnoDB —log-error=/opt/bitnami/mysql/data/mysqld.log —pid-file=/opt/bitnami/mysql/data/domU-12-31-38-04-64-E4.pid —socket=/opt/bitnami/mysql/tmp/mysql.sock —port=3306
root 4625 0.0 0.0 3416 776 pts/0 S<+ 15:08 0:00 grep mysql

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Everything seems correct. How you are trying to connect to MySQL? The MySQL database is configured to access from the same machine for security reasons by default.

Forums LAMPStack