Ubuntu 14.10 can't connect remotely with MySQL problem

Source: Internet
Author: User

After installing MySQL, if you need to connect remotely, you need to do some configuration, otherwise there will be some similar errors, such as

1045 (28000):1045 (28000) MySQL telnet 2003
Can not connect to MySQL error 10061

1 "Can not connect to MySQL error 10061" error occurs when MySQL connects to a server

set the bind-address option in the/etc/mysql/my.conf file to the IP of the MySQL server , which defaults to 127.0.0.1.

Then sudo/etc/init.d/mysql Restart--Restart service

2 "is not allowed to connect to this mysql server" error occurs when MySQL connects to the server

LocalHost of the host column in the user table in the MySQL database is %

DeleteFrom user where user='Root'and host <>'%'; --Remove redundant users update user set host='%'where host='localhost'and user='Root'; --Update HostSelectHost,user,password from user;
+-----------+------------------+-------------------------------------------+| Host      | user             | password                                  |+-----------+------------------+-------------------------------------------+ | localhost | Debian-sys-maint | *3b3724ae1051d0628525347dac3635a6c523f944 | | %         | root |             *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | |%         | hive |             * 4DF1D66463C18D44E3B001A8FB1BBFBEA13E27FC |+-----------+------------------+-------------------------------------- -----+

3 There is no 127.0.0.1 and localhost, so it is not possible to connect with the root user, it will prompt the following error

1045 (28000for 'root'@'localhost ' (using Password:yes)

at this time can only use the system comes with debian-sys-maint user login, give the root user to give new permissions. Debian-sys-maint The user's login password is displayed in clear text in/ETC/MYSQL/DEBIAN.CNF.

Grant all on * * to [email protected]'%'user_password';

4 If you do not want the root user to be Telnet, create a new user

Mysql-u Root-Pinsert into user (Host, User,password)Values("%","Hive", Password ("Hive")); FLUSH privileges; GRANT all Privileges on*. * To'Hive'@'%'Identified by'Hive'; FLUSH privileges;

Ubuntu 14.10 can't connect remotely with MySQL problem

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.