I have been working on this for a few days. It was possible to install mysql in the source code of Ubuntu12.04 after following the tutorials on the official website step by step. However, after installing Python-MySQLdb, mysql won't work and & ldquo will appear when it is started; theMySQLserverquitwithoutupdatingthePIDfile (/usr/local/bin/mysql/data/XXXXX. pid "error or & r
I have been working on this for a few days. It was possible to install mysql in the source code of Ubuntu 12.04 following the tutorials on the official website step by step, but mysql won't work after installing Python-MySQLdb, when it is started, The "the MySQL server quit without updating The PID file (/usr/local/bin/mysql/data/XXXXX. pid "error or" MySQL server cannot be found (/usr/bin/mysqld_safe) "error.
Related reading:
Install MySQL graphic http://www.linuxidc.com/Linux/2013-01/78716p3.htm in Ubuntu 12.04
Linux source install MySQL 5.6.12 (Cmake compilation) http://www.linuxidc.com/Linux/2013-07/87640.htm
Install MySQL 5.5 http://www.linuxidc.com/Linux/2013-04/83579.htm Based on Cmake Compilation
Ubuntu install MySQL 5.5 http://www.linuxidc.com/Linux/2013-07/87372.htm through Deb
It was later found that it was a/etc/mysql/my. the cnf file is generated after Python-MySQLdb is installed, unless you install mysql to copy the my-default.cnf to this location. The content of the/etc/mysql/my. cnf file after Python-MySQLdb is installed should be as follows:
#
# The MySQL database server configuration file.
#
# You can copy this to one:
#-"/Etc/mysql/my. cnf" to set global options,
#-"~ /. My. cnf "to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with -- help to get a list of available options and
# -- Print-defaults to see which it wocould actually understand and use.
#
# For explanations see
# Http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords shoshould be enclosed with ticks/quotes
# Escpecially if they contain "#" chars...
# Remember to edit/etc/mysql/debian. cnf when changing the socket location.
[Client]
Port = 3306
Socket =/var/run/mysqld. sock
# Here is entries for some specific programs
# The following values assume you have at least 32 M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[Mysqld_safe]
Socket =/var/run/mysqld. sock
Nice = 0
[Mysqld]
#
# * Basic Settings
#
User = mysql
Pid-file =/var/run/mysqld. pid
Socket =/var/run/mysqld. sock
Port = 3306
Basedir =/usr
Datadir =/var/lib/mysql
Tmpdir =/tmp
Lc-messages-dir =/usr/share/mysql
Skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# Localhost which is more compatible and is not less secure.
Bind-address = 127.0.0.1
#
# * Fine Tuning
#
Key_buffer = 16 M
Max_allowed_packet = 16 M
Thread_stack = 192 K
Thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# The first time they are touched
Myisam-recover = BACKUP
# Max_connections = 100
# Table_cache = 64
# Thread_concurrency = 10
#
# * Query Cache Configuration
#
Query_cache_limit = 1 M
Query_cache_size = 16 M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
# General_log_file =/var/log/mysql. log
# General_log = 1
#
# Error log-shoshould be very few entries.
#
Log_error =/var/log/mysql/error. log
#
# Here you can see queries with especially long duration
# Log_slow_queries =/var/log/mysql/mysql-slow.log
# Long_query_time = 2
# Log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# Note: if you are setting up a replication slave, see README. Debian about
# Other settings you may need to change.
# Server-id = 1
# Log_bin =/var/log/mysql/mysql-bin.log
Expire_logs_days = 10
Max_binlog_size = 100 M
# Binlog_do_db = include_database_name
# Binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10 MB datafile in/var/lib/mysql /.
# Read the manual for more InnoDB related options. There are done!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# Chroot =/var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca ".
#
# Ssl-ca =/etc/mysql/cacert. pem
# Ssl-cert =/etc/mysql/server-cert.pem
# Ssl-key =/etc/mysql/server-key.pem
[Mysqldump]
Quick
Quote-names
Max_allowed_packet = 16 M
[Mysql]
# No-auto-rehash # faster start of mysql but no tab completition
[Isamchk]
Key_buffer = 16 M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '. cnf', otherwise they'll be ignored.
#
! Includedir/etc/mysql/conf. d/
How can I modify the above files to enable mysql to start normally? Next, let's talk about how to install mysql and python-MySQLdb. Of course, if you choose to use apt-get install python-mysqldb mysql-server, the above error will not occur.
Next please see the wonderful content page 2nd: http://www.linuxidc.com/Linux/2013-08/89270p2.htm