In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the installation Guide of MySQL under Ubuntu Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn the "installation Guide for MySQL under Ubuntu Linux".
Install MySQL
Sudo apt-get install mysql-server
This should be very simple, and I don't think there is much problem with installation, so I won't say much about it. Let's talk about configuration.
Configure MySQL
Note that MySQL only allows local access by default under Ubuntu. If you want other machines to be able to access it, you need to change the / etc/mysql/my.cnf configuration file! Let's take it one step at a time:
After the default MySQL installation, the root user does not have a password, so first enter with the root user:
$mysql-u root
The reason for using-u root here is that I am now a regular user (firehare). If I don't add-u root, mysql will think that firehare is logging in. Note that I did not enter root mode here because it is not necessary. In general, it is not necessary to enter root mode when operating on a database in mysql, which is only possible when set up.
After entering mysql, the most important thing is to set the root user password in Mysql, otherwise, the Mysql service has no security to speak of.
Mysql > GRANT ALL PRIVILEGES ON *. * TO root@localhost IDENTIFIED BY "123456"
Note that I use 123456 as the password for root users here, but the password is not secure. Please use a mixed password of uppercase and lowercase letters and numbers, with no less than 8 digits.
In that case, set the root password in MySQL, and then use the root user to build the database you need. Let me take xoops as an example:
Mysql > CREATE DATABASE xoops
Mysql > GRANT ALL PRIVILEGES ON xoops.* TO xoops_root@localhost IDENTIFIED BY "654321"
This creates a user of xoops_roots that has full permissions on the database xoops. In the future, xoops_root is used to manage the xoops database, and there is no need to use the root user, and the permissions of that user are only limited to the xoops database.
If you want to access or control remotely, you need to do two things:
One is:
Mysql > GRANT ALL PRIVILEGES ON xoops.* TO xoops_root@ "" IDENTIFIED BY "654321"
Allow xoops_root users to log in to MySQL from any machine.
Second:
$sudo gedit / etc/mysql/my.cnf
In the old version
> skip-networking = > # skip-networking
In the new version
> bind-address=127.0.0.1 = > bind-address= the IP of your machine
This allows other machines to access MySQL.
At this point, I believe you have a deeper understanding of the "installation Guide for MySQL under Ubuntu Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.