[email protected] ~/桌面 $ ps -ef | grep mysql
mysql 1019 1 0 21:27 ? 00:00:00 /usr/sbin/mysqld
bells 1828 1761 0 21:28 pts/0 00:00:00 grep --colour=auto mysql
[email protected] ~/桌面 $ sudo /etc/init.d/mysql stop
[sudo] password for bells:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql stop
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop mysql
mysql stop/waiting
[email protected] ~/桌面 $ ps -ef | grep mysql
bells 1850 1761 0 21:28 pts/0 00:00:00 grep --colour=auto mysql
[email protected] /tmp $ sudo mysqld_multi start 1,2
[email protected] /tmp $ ps -ef | grep mysql
root 1864 1 0 21:29 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --port=3307 --pid-file=/var/run/mysqld/db-app1.pid --datadir=/var/lib/mysql --socket=/var/run/mysqld/mysql.sock1 --user=mysql --log_error=/tmp/mysql1.log
mysql 2121 1864 1 21:29 pts/0 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log_error=/tmp/mysql1.log --pid-file=/var/run/mysqld/db-app1.pid --socket=/var/run/mysqld/mysql.sock1 --port=3307
bells 2146 1761 0 21:29 pts/0 00:00:00 grep --colour=auto mysql
[email protected] /tmp $ ls
keyring-gHHfpn mysql2.log pulse-PKdhtXMmr18n virtual-bells.5ENcZa
mintUpdate pulse-2L9K88eMlGn7 ssh-eQiJHAQu1519
mysql1.log pulse-Ob9vyJcXyHZz unity_support_test.1
[email protected] /tmp $ sudo cat mysql1.log
120319 21:29:17 [Note] Plugin 'FEDERATED' is disabled.
120319 21:29:17 InnoDB: Initializing buffer pool, size = 8.0M
120319 21:29:17 InnoDB: Completed initialization of buffer pool
120319 21:29:17 InnoDB: Started; log sequence number 0 44233
120319 21:29:17 [Note] Event Scheduler: Loaded 0 events
120319 21:29:17 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.58-1ubuntu1' socket: '/var/run/mysqld/mysql.sock1' port: 3307 (Ubuntu)
[email protected] /tmp $ sudo cat mysql2.log
120319 21:29:17 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
120319 21:29:17 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120319 21:29:17 InnoDB: Initializing buffer pool, size = 8.0M
120319 21:29:17 InnoDB: Completed initialization of buffer pool
120319 21:29:17 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
[email protected] /tmp $ mysqld_multi report
WARNING: Log file disabled. Maybe directory or file isn't writable?
mysqld_multi log file version 2.16; run: 一 3月 19 21:35:22 2012
Reporting MySQL servers
MySQL server from group: mysqld1 is running
MySQL server from group: mysqld2 is not running
我一开机就把自动开启的mysql服务给关了,因为,不关的话,会跟mysqld1冲突,,之前我的mysqld1也起不来的,后来看了下日志,说和开机自启动的mysql冲突了。。