In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces how to allow users to connect remotely in mysql, the content is very detailed, interested friends can refer to it, I hope it can help you.
First, install MySQL.
This should be very simple, and I think everyone in the installation aspect is not too big a problem, so I will not say more, let's talk about configuration.
Second, configure MySQL
Note that MySQL defaults to local access only under Ubuntu. If you want other machines to be able to access it, you need to change the/etc/mysql/my.cnf configuration file! Here we go step by step:
After the default MySQL installation, the root user has no password, so first use the root user to enter:
$mysql -u root
The reason I use-u root here is because I am now a firehare user. If I don't add-u root, mysql will think that firehare is logging in. Note that I didn't go into root user mode here because it wasn't necessary. In general, there is no need to enter root user mode to operate on databases in mysql, only when it is set up.
After entering mysql, the most important thing is to set the root password in Mysql, otherwise, Mysql service has no security.
mysql> GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY "123456";
Note that I use 123456 as the root password, but the password is not secure, please use a mixture of upper and lower case letters and numbers, and no less than 8 digits.
In this case, set up the root password in MySQL, and then use root to create the database you need. Let me take xoops as an example:
mysql>CREATE DATABASE xoops;
mysql>GRANT ALL PRIVILEGES ON xoops.* TO IDENTIFIED BY "654321";
This creates a user of xoops_roots that has full access to the database xoops. Xoops_root is used to manage the xoops database, and there is no need to use root, and the user's permissions are limited to the xoops database.
Third, if you want remote access or control, then you have to do two things:
One:
mysql>GRANT ALL PRIVILEGES ON xoops.* TO " IDENTIFIED BY "654321";
Allow xoops_root to log in to MySQL from any machine.
Second:
$sudo gedit /etc//my.cnf
In the old version,
>skip-networking => # skip-networking
In the new version
>bind-address=127.0.0.1 => bind-address= IP of your machine
How to allow users to connect remotely in mysql is shared here. I hope the above content can be of some help to everyone and learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.