domain name resolution process to avoid the above problems.
V. How to connect to the database after mysql. sock is lost
When you connect to the database on the MySQL server, mysql. sock often does not exist, resulting in connection failure. This is because if localhost is s
A solution for php to connect to mysql but the mysql command line operation is normal failure: the php website fails to connect to mysql, but the command line can be used to log on and operate normally through the mysql command.
Solution:
1. log on to mysql under the comma
/chkconfig-del mysql
7. Change the MySQL directory
The default data file storage directory of MySQL is/var/lib/mysql. To move the directory to/home/data, perform the following steps:
1. Create a data directory under the home DirectoryCd/homeMkdir data
2. Stop the MySQL servi
)
Then, you can access the addbook database in MySQL as the identity of the locally available account:
#/Usr/local/mysql/bin/mysql-u maa-p addbook
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with-
Welcome to the MySQL mo
. Change the MySQL directory
The default data file storage directory of MySQL is/var/lib/MySQL. To move the directory to/home/data, perform the following steps:
1. Create a data directory under the Home DirectoryCD/homeMkdir data
2. Stop the MySQL service process:Mysqladmin-u root-P Shutdown
3. Move the entire/
default value is latin1.DEFAULT_COLLATION: specifies the default server verification rules. The default value is latin1_general_ci.ENABLED_LOCAL_INFILE: Specifies whether local load data infile execution is allowed. the default value is OFF.WITH_COMMENT: specifies the compilation remarks.WITH_xxx_STORAGE_ENGINE: it specifies the storage engine for static compilation to mysql. by default, four engines, MyISAM, MERGE, MEMBER, and CSV, are compiled to t
server through socket '/var/lib/mysql. sock' (2)
The mysql service has not been started. Enter service mysql start to start the mysql service.
service mysql startThen enter mysql. If t
install cmake-y
[Root @ serv01 mysql-5.5.29] # yum install ncurses-devel-y
Step 6: Key Steps. This step is also different from MySQL 5.1. use the cmake command to configure the environment, as shown below:
[Root @ serv01 mysql-5.5.29] # cmake ./
-DCMAKE_INSTALL_PREFIX =/usr/local/mysql/
-DWITH_INNOBASE_STORAGE_ENGIN
. cnfbak before modificationVi/etc/my. cnfAfter the datadir directory is opened, change it to/data/mysql.Change the socket to/data/mysql. sock # To ensure security, you can comment out the original one and add a new line to the current directory.Modify the second file: before modification, back up cp/etc/init. d/mysqld/etc/init. d/mysqldbakVi/etc/init. d/mysqldNote: The exact location is/etc/rc. d/init. d/m
-uroot -p -S /data/3307/mysql.sock Tip: Multiple instances via MySQL-s specify a different sock file login Note: Multiple instance remote connections do not need to specify a sock path mysql -uroot -p -h 192.168.1.115 -P3306 7.3 Use MySQL help command The help command in
/bin
cd/usr/local/bin
chmod +x ndb_mgm*
Third, the Configuration data node (192.168.124.142, 192.168.124.143)
1. Add MySQL group and user
Run the following command in the shell:
Groupadd MySQL
2. Configure MY.CNF configuration file
Run the following command in the shell:
The contents of the configuration file my.cnf are as follows:
[Mysqld]
Basedir=/
). Both files are in the bin folder after the mysql-cluster file is decompressed. Perform the following steps to install ndb_mgmd and ndb_mgm on the Management node of the cluster.
1. Change the address to the/var/tmp directory, decompress the mysql-cluster compressed file, and copy ndb_mgm and ndb_mgmd to the/usr/local/bin directory.
[Root @ localhost ~] # Cd/var/tmp
[Root @ localhost TMP] # tar-xzvf
connect to local MySQL server through Socket '/var/lib/mysql/mysql.sock ' "Problem:
123456789101112
[mysqld] DataDir=/storage/db/mysql Socket=/storage/db/mysql/mysql. Sock [
datadir to specify the path of the data file!
-- HostSpecify host name/IP Address
-- PortSpecify the port to be connected. If the default value is 3306, ignore this parameter.
-- SocketThe location of the connection set byte. The default value is/var/lib/mysql. sock.
-- Use-memory = 4GThis parameter is used to control the memory used for backup. The default value is 100 MB! It is generally used with -- app
directoryThe default data file storage directory of MySQL is/var/lib/mysql. To move the directory to/home/data, perform the following steps:1. Create a data directory under the home DirectoryCd/homeMkdir data2. Stop the MySQL service process:Mysqladmin-u root-p shutdown3. Move the entire/var/lib/mysql directory to/hom
/chkconfig-del mysql
Change MySQL directory
The default data file storage directory of MySQL is/var/lib/mysql. To move the directory to/home/data, perform the following steps:
1. Create a data directory under the home Directory
Cd/home
Mkdir data
2. Stop the MySQL service pr
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.