Record: Abnormal
1. Make preparations for installation and use...
Linux Code
- # binary file ( if you provide your own files, be sure not to make the version wrong because I am not familiar with it.
- This problem has occurred
-
-
-
-
- )
- wget http://dev.mysql.com/get/Downloads/MySQL- 5.5/mysql-5.5.12.tar.gz/from/http://mysql.he.net/
-
- # cmake compilation
- wget http://www.cmake.org/files/v2. 8/cmake-2.8.4.tar.gz
-
- wget http://ftp.gnu.org/gnu/bison/bison- 2.4.3.tar.gz
-
- apt-Get install make // the network resource address is not found.
# Binary files (If you provide your own files, be sure not to make the version wrong, because I am not very familiar with it and have encountered this problem.Wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.12.tar.gz/from/http://mysql.he.net/ # cmake compile wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz wget http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz apt-Get install make // network resource address not found leave
2. Install cmake
Linux code
- CD/usr/local/
- Tar zxvf cmake-2.8.4.tar.gz // download the cmake file path
- CD cmake-2.8.4
- ./Bootstrap
- Make
- Make install
CD/usr/local/tar zxvf cmake-2.8.4.tar.gz // download the cmake file path to CD cmake-2.8.4./Bootstrap make install
3. Install bison
Linux code
- Tar zxvf bison-2.4.3.tar.gz
- CD bison-2.4.3
- ./Configure
- Make
- Make install
Tar zxvf bison-2.4.3.tar.gz CD bison-2.4.3./configure make install
Exception Code
- 1. Configure: Error: no acceptable C compiler found in $ path
- Cause: the GCC compiler is not installed.
- Solution: APT-Get install gcc
1. Configure: Error: no acceptable C compiler found in $ path cause: GCC compiler is not installed. Solution: APT-Get install gcc
4. Compile and install MySQL
# Create a user
Linux code
-
- Groupadd MySQL
-
-
- Useradd-G MySQL
-
-
- CD/usr/local
-
-
- Tar zxvf ../MySQL-5.5.12.tar.gz // put the binary file under/usr.
-
-
- CD mysql-5.5.12
-
- # Compile a binary file
-
- Cmake-dcmake_install_prefix =/usr/local/MySQL \
-
- -Dmysql_unix_addr =/tmp/MySQL. Sock \
-
- -Ddefault_charset = utf8 \
-
- -Ddefault_collation = utf8_general_ci \
-
- -Dwith_extra_charsets: String = utf8, GBK \
-
- -Dwith_myisam_storage_engine =1 \
-
- -Dwith_innobase_storage_engine =1 \
-
- -Dwith_memory_storage_engine =1 \
-
- -Dwith_readline =1 \
-
- -Denabled_local_infile =1 \
-
- -Dmysql_datadir =/var/MySQL/data \
-
- -Dmysql_user = MySQL
-
- Make // This step takes a long time (the package of this file contains cmakelists.txt)
-
-
- Make install
Groupadd MySQL useradd-G MySQL CD/usr/local tar zxvf .. /mysql-5.5.12.tar.gz // I put the binary file under/usr CD mysql-5.5.12 # compile the binary file cmake-dcmake_install_prefix =/usr/local/MySQL \-dmysql_unix_addr =/tmp/MySQL. sock \-ddefault_charset = utf8 \-ddefault_collation = utf8_general_ci \-dwith_extra_charsets: String = utf8, GBK \-records = 1 \-records = 1 \-records = 1 \-dwith_readline = 1 \-denabled_local_infile = 1 \-dmysql_datadir =/var/MySQL/data \-dmysql_user = mySQL make // This step takes a long time (the package of this file contains cmakelists.txt) make install
# Modifying users and permissions
Java code
- /Usr/sbin/groupadd MySQL
- /Usr/sbin/useradd-G MySQL
- Chmod + w/usr/local/MySQL
- Chown-r MYSQL: MySQL/usr/local/MySQL
- Mkdir-P/var/MySQL/
- Mkdir-P/var/MySQL/data/
- Mkdir-P/var/MySQL/log/
- Chown-r MYSQL: MySQL/var/MySQL/
- CD support-files/
- CP my-large.cnf/var/MySQL/My. CNF (for Debian, my. conf needs to be placed under/etc/MySQL)
- CP mysql. Server/etc/init. d/mysqld
/Usr/sbin/groupadd MySQL/usr/sbin/useradd-G MySQL chmod + w/usr/local/MySQL chown-r MYSQL: mySQL/usr/local/MySQL mkdir-P/var/MySQL/data/mkdir-P/var/MySQL/log/chown-r MYSQL: mySQL/var/MySQL/CD support-files/CP my-large.cnf/var/MySQL/My. CNF (for Debian, my. conf needs to be placed under/etc/MySQL/) CP MySQL. server/etc/init. d/mysqld
Exception Code
- 2. Fatal error: cocould not find mysqld (the command prompt is not too clear, that is, the mysqld command cannot be found)
- Solution ln-SF/usr/local/MySQL/bin/*/usr/bin
2. fatal error: cocould not find mysqld (the command prompt is not clear, that is, the mysqld command cannot be found) solution ln-SF/usr/local/MySQL/bin/*/usr/bin
Exception Code
- 3 fatal error: cocould not find errmsg. sys
- Cause: the file cannot be accessed under a specific path. If you just copy the file, the following will appear:
- The same problem occurs because it depends on the/usr/local/MySQL/share folder and I copied it directly or created a soft connection.
- Solution
- CD/usr/share/
- Mkdir MySQL
- CD MySQL
- CP-A/usr/local/MySQL/share /*.
3 fatal error: cocould not find errmsg. SYS: the file cannot be accessed under a specific path. If you just copy the file, the same problem may occur below, because it depends on the/usr/local/MySQL/share folder, I copied it directly, or create a soft connection solution CD/usr/share/mkdir MySQL CD MySQL CP-A/usr/local/MySQL/share /*.
Exception Code
- 4/usr/bin/mysqld: Error while loading shared libraries: libaio. so.1: cannot open shared object
-
- file: no such file or directory
- install libaio-dev
- tips
-
- NO apt-Get update was found when I searched for the reason on the Internet, so the uninformed apt-Get update fuck is invalid, write Article
- for details, this Linux apprentice shows that the workload is very high
- go to the following URL and follow the prompts to modify/etc/APT/sources. List
- http://packages.debian.org/zh-cn/lenny/i386/libaio-dev/download
- after writing, go to Apt-Get update
- # installation
- apt-Get install libaio-dev
4/usr/bin/mysqld: Error while loading shared libraries: libaio. so.1: cannot open shared object file: no such file or directory when installing libaio-dev tips on the Internet to find the cause, it is said that there is no apt-Get update, so the ignorant apt-Get update fuck is invalid. To write an article in detail, I am a Linux apprentice, which indicates that the pressure is great to go to the following URL and follow the prompts to modify/etc/APT/sources. list http://packages.debian.org/zh-cn/lenny/i386/libaio-dev/download after writing in apt-Get update # Install apt-Get install libaio-Dev
Exception Code
- 5. 110518 15:09:27 [Error]/usr/local/MySQL/bin/mysqld: Unknown option '-- skip-bdb'
- Solution Vim/etc/MySQL/My. CNF comment out the line skip-bdb
5. 110518 15:09:27 [Error]/usr/local/MySQL/bin/mysqld: Unknown option '-- skip-bdb' solution Vim/etc/MySQL/My. CNF comment out the line skip-bdb
Linux code
- CARY:/usr/local/MySQL # scripts/mysql_install_db -- datadir =/var/MySQL/data/-- basedir =/usr/local/MySQL
- -- User = MySQL
CARY:/usr/local/MySQL # scripts/mysql_install_db -- datadir =/var/MySQL/data/-- basedir =/usr/local/MySQL -- user = MySQL
Start Database
Linux code
- /Etc/init. d/mysqld start
Exception Code
- This is the exception information I have simulated
-
- /etc/init. d/mysqld: Line 276: CD:/usr/local/mysq1l: no such file or directory
-
- solution: in VIM/etc/MySQL/My. CNF, the configuration parameters of mysqld must be consistent with those installed above.
-
- for example, in my. CNF
-
- [mysqld]
-
- ...
-
- change the basedir =/usr/local/mysq1l parameter to/usr/local/MySQL configured above.
This is my simulated exception information/etc/init. d/mysqld: Line 276: CD:/usr/local/mysq1l: no such file or directory solution Vim/etc/MySQL/My. in CNF, the configuration parameters of mysqld must be consistent with the configuration parameters you installed above, as shown in my. [mysqld]... change the basedir =/usr/local/mysq1l parameter to/usr/local/MySQL
Change administrator password
Java code
- Mysqladmin-uroot password '123'
Mysqladmin-uroot password '123'
Exception Code
- Starting MySQL... the server quit without updating PID file (/var/run/mysqld. PID). failed!
- Solution
- Pkill-F MySQL
- Rm/var/run/MySQL /*
- Restart MySQL
Starting MySQL... the server quit without updating PID file (/var/run/mysqld. PID). failed! Solution: pkill-F MySQL RM/var/run/MySQL/* restart MySQL
: If the downloaded file is a compiled file, you can skip this step without cmake compilation.
Cannot create a remote user to log on ??
Vim/etc/MySQL/My. CNF
Comment out bind-address 127.0.0.1