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--
Today, I will talk to you about how to install and configure MYSQL in ubuntu. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
Configure MySQL
Note that MySQL only allows local access by default, so you need to change the / etc/mysql/my.cnf configuration file if you want other machines to be able to access it!
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.
If you are using root users to enter, you can proceed directly to step 3 without switching users.
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 am using 123456 as the password for the root user here.
Use root users 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.
The test passed, but I don't know why the speed of access is very slow. It may be that the memory of UBUTN is only 100m. Haha!
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.
Install MYSQLCC under DESTOP version
Apt-get install mysqlcc
Gedit / usr/share/applications/MySQLCC.desktop
Insert the following lines into the new file
Insert the following statement into the new file
[Desktop Entry]
Name=MySQLCC
Comment=MySQLCC
Exec=mysqlcc
Icon=/usr/share/pixmaps/mysqlcc.xpm
Terminal=false
Type=Application
Categories=Application;System
After reading the above, do you have any further understanding of how to install and configure MYSQL in ubuntu? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.