CentOS Install MySQL database encountered problems notes

Source: Internet
Author: User
Tags localhost mysql


CentOS install MySQL is very simple as follows command

Yum install MySQL installed,

Running MySQL
ERROR 2002 (HY000): Can ' t connect to the local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2). There is an article that is a matter of authority, and then the authority to make 777 also not. Said it was not started MySQL. Then start it.

[root@localhost mysql]# service MySQL start
Mysql:unrecognized Service
No way... The internet can not find a why. Said it was started with RC.D.

/etc/rc.d/init.d/mysqld start
-bash:/etc/rc.d/init.d/mysqld:no such file or directory
Still not.

Later find articles, someone is installed mysql-server. Just put the front of the deleted. Remove with yum remove MySQL. Yum is still very convenient, hehe.

Then yum install Mysql-server

It's all packed. Start

[root@localhost mysql]# service MySQL start
Mysql:unrecognized Service
Still........

Then/etc/rc.d/init.d/mysql starts

/etc/init.d/mysqld start
Initializing MySQL database:installing mysql system tables ...
110112 15:24:06 [Warning] option ' max_join_size ': Unsigned value 18446744073709551615 adjusted to 4294967295
110112 15:24:06 [Warning] option ' max_join_size ': Unsigned value 18446744073709551615 adjusted to 4294967295
Ok
Filling Help Tables ... www.111cn.net

110112 15:24:06 [Warning] option ' max_join_size ': Unsigned value 18446744073709551615 adjusted to 4294967295
110112 15:24:06 [Warning] option ' max_join_size ': Unsigned value 18446744073709551615 adjusted to 4294967295
Ok

To start mysqld at boot time and you have to copy
Support-files/mysql.server to the ' right place ' for your system

Please REMEMBER to SET A PASSWORD for the MySQL root USER!
To did so, start the server, then issue the following commands:
/usr/bin/mysqladmin-u root password ' new-password '
/usr/bin/mysqladmin-u root-h localhost.localdomain password ' new-password '

Alternatively you can run:
/usr/bin/mysql_secure_installation

Which would also give you the option of removing the test
Databases and anonymous user created by default. This is
Strongly recommended for production servers.

The manual for more instructions.

You can start the MySQL daemon with:www.111cn.net
CD/USR; /usr/bin/mysqld_safe &

Can test the MySQL daemon with mysql-test-run.pl
CD mysql-test; Perl mysql-test-run.pl

Please have a problems with The/usr/bin/mysqlbug script!

The latest information about the MySQL is available on the Web at
Support MySQL by buying support/licenses at
[OK]
Starting MySQL: [OK]

All right.. Unexpectedly ... Oh

Add it to self starter. Save the Trouble

Chkconfig mysqld on

Look, this is mysqld, not MySQL.

Run MySQL

[Root@localhost/]# MySQL
Welcome to the MySQL Monitor. Commands End With; or G.
Your MySQL Connection ID is 2
Server version:5.0.77 Source Distribution

Type ' help, ' or ' h ' for help. Type ' C ' to clear the buffer.

Oh, good! The problem is solved!

Try again [root@localhost mysql]# service mysqld Restart
stopping MySQL: [OK]
Starting MySQL: [OK]

It's all OK!

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.