I have installed 3rd mysql instance on my testing server.
2 instances already running without any issues.
When I installed 3rd instance by mysql-5.5.30 zip source, it installed successfully but when I tried to restart 3rd instance of mysql it says,
MySQL server PID file could not be found! [FAILED]
The server quit without updating PID file.
1st instance running on 3305
BASEDIR: /usr/local/mysql Configuration File: /etc/my.cnf Socket: /tmp/mysql.stock
2nd instance running on 3306
BASEDIR: /backup/mysql-cbt Configuration File: /backup/mysql-cbt/my.cnf Socket: /backup/mysql-cbt/mysql.stock
3rd instance running on 3307
BASEDIR: /home/mysql-5/ Configuration File: /home/mysql-5/my.cnf Socket: /home/mysql-5/mysql.stock
Error Log is as follows.
130513 11:22:23 mysqld_safe Starting mysqld daemon with databases from /backup/mysql-cbt/data<br> 130513 11:22:23 InnoDB: The InnoDB memory heap is disabled<br> 130513 11:22:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins<br> 130513 11:22:23 InnoDB: Compressed tables use zlib 1.2.3<br> 130513 11:22:23 InnoDB: Using Linux native AIO<br> 130513 11:22:23 InnoDB: Initializing buffer pool, size = 128.0M<br> 130513 11:22:23 InnoDB: Completed initialization of buffer pool<br> 130513 11:22:23 InnoDB: highest supported file format is Barracuda.<br> 130513 11:22:23 InnoDB: Waiting for the background threads to start<br> 130513 11:22:24 InnoDB: 5.5.30 started; log sequence number 1595675<br> 130513 11:22:24 [ERROR] /backup/mysql-cbt/bin/mysqld: unknown option '--safe- show- database'<br> 130513 11:22:24 [ERROR] Aborting<br> 130513 11:22:24 InnoDB: Starting shutdown...<br> 130513 11:22:25 InnoDB: Shutdown completed; log sequence number 1595675<br> 130513 11:22:25 [Note] /backup/mysql-cbt/bin/mysqld: Shutdown complete<br> 130513 11:22:25 mysqld_safe mysqld from pid file /backup/mysql-cbt/cbt-instance.pid ended
Still unable to figure out this error. How can I start the 3rd instance?
Here is the story from beginning. I have installed mysql via source:
- extracted source mysql-5.5.30-linux2.6-x86_64.tar.gz to directory, then recursively change permission of mysql directory to user & group mysql.
- in scripts directory of mysql I run this command as root:
[root@server /backup/mysql-cbt/scripts]# ./mysql_install_db --basedir=/backup/mysql-cbt/ --datadir=/backup/mysql-cbt/data --defaults-file=/backup/mysql-cbt/my.cnf --user=mysql** Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /backup/mysql-cbt//bin/mysqladmin -u root password 'new-password' /backup/mysql-cbt//bin/mysqladmin -u root -h 18.104.22.168 password 'new-password' Alternatively you can run: /backup/mysql-cbt//bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /backup/mysql-cbt/ ; /backup/mysql-cbt//bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /backup/mysql-cbt//mysql-test ; perl mysql-test-run.pl Please report any problems with the /backup/mysql-cbt//scripts/mysqlbug script!
When I restart this instance it gives error of updating pid and exit.
Which step is missing?
my.cnf file (
[mysqld] federated basedir = /backup/mysql-cbt datadir = /backup/mysql-cbt/data log-error = /backup/mysql-cbt/cbt-instance.err pid-file = /backup/mysql-cbt/cbt-instance.pid #socket = /tmp/mysql.sock socket = /backup/mysql-cbt/mysql.sock port = 3310 user = mysql tmpdir = /backup/mysql-cbt/tmpdir
# If you want to affect other MySQL variables, you should make your changes # in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files. # If you change base dir, you must also change datadir. These may get # overwritten by settings in the MySQL configuration files. basedir=/backup/mysql-cbt datadir=/backup/mysql-cbt/data # Default value, in seconds, afterwhich the script should timeout waiting # for server start. # Value here is overriden by value in my.cnf. # 0 means don't wait at all # Negative numbers mean to wait indefinitely service_startup_timeout=900 # Lock directory for RedHat / SuSE. lockdir='/var/lock/subsys' lock_file_path="$lockdir/mysql" # The following variables are only set for letting mysql.server find things. # Set some defaults mysqld_pid_file_path=/backup/mysql-cbt/mysql-cbt-instance.pid if test -z "$basedir" then basedir=/usr/local/mysql-cbt bindir=/usr/local/mysql-cbt/bin if test -z "$datadir" then datadir=/backup/mysql-cbt/data fi sbindir=/backup/mysql-cbt/bin libexecdir=/backup/mysql-cbt/bin else bindir="$basedir/bin" if test -z "$datadir" then datadir="$basedir/data" fi sbindir="$basedir/sbin" libexecdir="$basedir/libexec" fi