Home > Database > Mysql Tutorial > body text

Ubuntu下MySQL配置为外网访问_MySQL

WBOY
Release: 2016-05-30 17:10:54
Original
1635 people have browsed it

Ububtu安装MySQL后默认外网无法连接,但是很多时候我们想要在外网访问方便管理。在这里,简单叙述一下自己在配置过程中的操作,步骤如下:

 

以root身份登入mysql

 

mysql -u root -p

 

创建可外网登陆用户

CREATE USER 'custom'@'%.example.com' IDENTIFIED BY 'user_password';

 

为用户授权

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP  ON customer.* TO  'custom'@'%';

 

检查/etc/mysql/my.cnf,去掉绑定ip

 

重启服务

 

sudo service mysql restart

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!