Problem description:1. After installing MySQL, useService mysqld restartThe stop mysqld service always fails.2. the/var/lib/MySQL. Sock issue cannot be found when you log on with MySQL-uroot-P.3. Use Service mysqld status to display MySQL dead but subsys lockedSolution:Most
hardware" separately.// |/Usr Install the MySQL service and start the service:MySQL generally uses the current STABLE version:Try not to use the -- with-charset = option. I feel that with-charset is only useful in alphabetical order. These options will cause a lot of trouble for data migration.Try not to use innodb. innodb is mainly used for enterprise-level support such as foreign keys and transactions, at the cost of reducing the speed by an order
:
-DMYSQL_TCP_PORT = 3306 set the default port
-DMYSQL_UNIX_ADDR =/tmp/mysql. sock MySQL socket location for inter-process communication
-DENABLED_LOCAL_INFILE = 1 whether to start the local LOCAL_INFILE
-DEXTRA_CHARSETS = all: additional character sets supported
-DDEFAULT_CHARSET = utf8 default character set
-DDEFAULT_COLLATION =
This article mainly introduces how to install MySQL and enable MySQL remote access in CentOS, including the introduction of MySQL random start and other operations. For more information, see
Install MySQL
Install MySQL and php-mysql
As an O M personnel, you should not only learn how to build and install mysql services, but also understand the use of basic commands and syntaxes. This is the note I have summarized after learning, and I hope it will be helpful to Cainiao like me.
1. log on to the mysql database1. connect to the local mysql database. the default port is 3306. #
How to modify the mysql password and forget the mysql password bitsCN.com
How to modify the mysql password and forget the mysql password
Modify the MySQL password:
1 mysqladmin-u root-p password 1234562 mysqladmin-u username-p old password new password
Forget the
/mysql points to a new location. If the/usr/local/mysql directory exists, first change it to/usr/local/mysql. bak. After installation, the installer runs mysql_install_db to create an authorization table in the MySQL database.
The installation layout is similar to that of the tar binary distribution. all
startup Service Group of your system.[Root @ local] #/sbin/chkconfig? Add mysql3) Delete MySQL from the startup Service Group.[Root @ local] #/sbin/chkconfig? Del mysql
Change MySQL directoryThe default data file storage directory of MySQL is/var/lib/mysql. To move the dire
Php cannot use localhost to connect to the mysql server. mysql is installed in redhat. in the mysql console, you can use localhost to connect to the server. However, when you connect to the server in php, you cannot connect to the server using 127.0.0.1, I checked the hosts file and found that there are 127.0.0.1 and localhost corresponding to which man knows wha
MySQL Service maintains the backup of the note-taking service
Try to use MySQL DUMP instead of backing up data files directly. The following is a script that backs up data on weekday: the backup interval and cycle can be determined based on the backup requirements.
/Home/mysql/bin/mysqldump-S/data/app_1/mysql.
Solution to two common MYSQL errors in linux: 1. mysql logon error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql. sock' (2)
Solution:
1) the default mysql.
function returns NULL when the tail of the result set is returned.
8. After the result set is exhausted, call the Mysql_free_result function to release the result set to prevent memory leaks. The prototype of the Mysql_free_result function is as follows:
void StdCall mysql_free_result (mysql_res *result);
9, no longer query the MySQL database, call the Mysql_close function to close the database connection. The prototype of the Mysql_close function
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock ' (2)Error:Input#mysql-U root-pERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock ' (2)Scenario 1.1. #ps-a|grep MySQLShow similar:1829? 00:00:00 Mysqld_safe1876? 00:00:31 mysqld2. #kill-9 18293. #kill-9 18764.#/e
The MySQL Server suddenly cannot be started. Check the final startup log as follows: 08082509: 38: 04mysqldstarted0808259: 38: 04 [ERROR] Can
The MySQL Server suddenly cannot be started. Check the final startup log as follows: 080825 09:38:04 mysqld started080825 9:38:04 [ERROR] Can
The MySQL Server suddenly cannot be started. Check the final startup log as
This article describes how to optimize MySQL configuration file my. cnf. For more information, see MySQL 5.5.13.
Parameter description:
[Client]
Character-set-server = utf8
Port = 3306
Socket =/data/mysql/3306/mysql. sock
[Mysqld]
Character-set-server = utf8
User =
(‘123456‘) where user=‘root‘;
After modifying the skip-grant in the configuration file, the commands in MySQL need to be separated by a semicolon ";" End two, connect MySQL
mysql -uroot -p123456 mysql -uroot -p123456 -h127.0.0.1 -P3306 //指定ip和端口,用于链接远程服务器的mysql
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.