Linux installation after the initialization of MySQL database, use mysqld_safe to start mysql database, the following found that the startup failed [root @ SVNServerbin] #. mysqld_safe-usermysqlnbsp; etcinit. dmysqldstartStartingMySQL. ERROR! TheserverquitwithoutupdatingPIDfile (datamy
After installing and initializing the MySQL database in Linux, use mysqld_safe to start the mysql database. The following shows that the startup failed [root @ SVNServer bin] #. /mysqld_safe-user = mysqlnbsp;/etc/init. d/mysqld start Starting MySQL. ERROR! The server quit without updating PID file (/data/my
After installing and initializing the MySQL database in Linux, use mysqld_safe to start the mysql database.
[Root @ SVNServer bin] #./mysqld_safe-user = mysql &
Or
[Root @ SVNServer bin] #/etc/init. d/mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/AY14020816093477605eZ. pid ).
Restarting mysql will throw a red font error.
You can only see the mysql startup failure. for specific reasons, you need to view the. err file in the database directory and view the. err file. The content is as follows:
140726 00:18:10 mysqld_safe mysqld from pid file/data/mysql/AY14020816093477605eZ. pid ended
140726 00:31:19 mysqld_safe Starting mysqld daemon with databases from/data/mysql
/Usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
140726 0:31:19 [ERROR] Aborting
140726 0:31:19 [Note]/usr/local/mysql/bin/mysqld: Shutdown complete
This error report is marked in red. errcode13 is generally a permission issue. Check whether the mysql user has the write permission on all files in the database directory, modify the user and user group permissions of the MySQL directory:
Chown-R mysql: mysql/usr/local/mysql
View the/usr/local/mysql directory permissions, as shown in figure
When the problem is found, it is indeed a permission problem. The following troubleshooting is simple. Assign all the users in the data directory to the mysql user.
Available in redhat System: Chown mysql. mysql-R/usr/local/mysql
Available in CentOS: Chown mysql: mysql-R/usr/local/mysql
Now, start mysql again. For example, no error is reported.
[Root @ SVNServer bin] #/etc/init. d/mysqld start
If an error is still reported, it may be caused by the permission setting of the/usr/local/mysql directory. The permission setting is as follows:
Chmod 755/usr/local/mysql
After setting, view the permission as follows: ll/usr/local/mysql
Drwxr-xr-x 9 mysql 12288 July 26 09:50 mysql
Try to connect, for example, OK