How to enable Mysql remote access under Ubuntu 14.04

Find my.cnf in the directory /etc/mysql, edit with vim, and find the inside of my.cnf

# bind-address           =127.0.0.1

Comment the code that can only be accessed by local ip

Then use root to log in to the Mysql database

im@58user:~$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with; or \g.
Your MySQL connection id is 6
Server version:5.5.53-0ubuntu0.14.04.1(Ubuntu)Copyright(c)2000,2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.

mysql>

And then execute

mysql> grant all on *.* to root@'%' identified by '123';
myslq> flush privileges;

Finally, you can log in to mysql remotely with the user and password you just created.

The following error may be encountered when executing the user authorization password:

ERROR 1290(HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

Solution:

First refresh the permission table.
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)

Recommended Posts

How to enable Mysql remote access under Ubuntu 14.04
How to change MySQL password under Ubuntu
How to install MySQL on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to compile ijkplayer-android under ubuntu
How to install mysql in Ubuntu 14.04
MySQL connected to remote Ubuntu server
How to install mysql in Ubuntu 14.04
How to install MySQL on Ubuntu 14.04
How to install Audacious under Ubuntu
How to install Tensorflow under ubuntu 16.04
How to install MySQL on Ubuntu 18.04 (linux)
Install mysql under Ubuntu 16.04
How to upgrade to Ubuntu 20.04
Install MySQL under Ubuntu
Remote connection to Ubuntu 19.1
How to install gcc compiler faster under Ubuntu
How to upgrade to Ubuntu 20.04
How to install the latest MySQL on Ubuntu 18.04
How to repackage Deb files under Debian and Ubuntu
How to install and use MySQL Workbench on Ubuntu 18.04
How to open https on nginx server under Ubuntu
ubuntu 16.10 supports ssh remote access
How to upgrade to Ubuntu 16.04 LTS
How to create LVM for XFS file system under Ubuntu
How to install JDK and Mysql on Ubuntu 18.04 linux system
How to map shared disk to window in linux under Ubuntu
How to install Helm in Ubuntu
How to install MySQL on CentOS 8
How to install Memcached on Ubuntu 20.04
How to install Java on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04
How to install Anaconda3 on Ubuntu 18.04
How to install Memcached on Ubuntu 18.04
How to install Jenkins on Ubuntu 16.04
How to install Go on Ubuntu 20.04
How to install Mailpile on Ubuntu 14.04
How to install PrestaShop on Ubuntu 16.04
How to upgrade to PHP 7 on Ubuntu 14.04
How to install Skype on Ubuntu 20.04
How to install Jenkins on Ubuntu 20.04
How to install Python 3.8 on Ubuntu 18.04
How to install KVM on Ubuntu 18.04
Install MySQL under Ubuntu 18.04 (graphic tutorial)
How to install KVM on Ubuntu 20.04
How to install Anaconda on Ubuntu 20.04
How to install Prometheus on Ubuntu 16.04
How to install Jenkins on Ubuntu 18.04
How to deploy Django on Ubuntu 14.04
How to install Apache on Ubuntu 20.04
How to install R on Ubuntu 20.04
How to install Moodle on Ubuntu 16.04