In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Recorded the installation and use tutorial of mysql 8.0.12 for your reference.
Windows
First download the compressed package from the official website.
Decompress in the installation directory
Enter the compressed directory and create a new my.ini under the directory. The configuration content is as follows
[mysqld] # set port 3306 port=3306# set mysql installation directory basedir=D:\\ mysql\\ mysql-8.0.12-winx64 # remember to use double slash\\, single slash I will make mistakes here, but look at other people's tutorials, there are plenty of single slashes. Try it yourself # set the directory where the data of the mysql database is stored datadir=D:\\ mysql\\ mysql-8.0.12-winx64\\ Data # here is the same as above # the maximum number of connections allowed max_connections=200# the number of connections allowed to fail. This is to prevent anyone from attempting to attack the character set used by the max_connect_errors=10# server of the database system from this host. By default, the default storage engine default-storage-engine=INNODB# that UTF8character-set-server=utf8# will use when creating a new table uses the "mysql_native_password" plug-in authentication default_authentication_plugin=mysql_native_ password [MySQL] # to set the mysql client default character set default-character-set=utf8 [client] # setting. Set the port port=3306default-character-set=utf8 used by default when the mysql client connects to the server
Add a directory to an environment variable
Run cmd as an administrator
Execute the command under the bin directory of the MySQL installation directory: mysqld-- initialize-- console; will print the initial password of the root user after execution is complete, such as:
[Server] A temporary password is generated for root@localhost: rI5rvf5x5G,E
Where rI5rvf5x5G,E is the initial password and does not contain spaces. Don't close it cheaply.
Execute the command in the bin directory of the MySQL installation directory: mysqld-- install
After the installation is complete, you can start the MySQL service with the command net start mysql. Stop the service by commanding net stop mysql. Uninstall the MySQL service by sc delete MySQL/mysqld-remove command
Execute the command in the bin directory of the MySQL installation directory: mysql-u root-p (log in to mysql as a root account with an empty password), and then enter the password above
Execute the command in MySQL:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' New password
Note that there must be ";" at the end of the command. This is the syntax of mysql.
Administrator root's host is localhost, which means localhost login access only. If you want to allow other ip logins to be open, you need to add a new host. If you want to allow all ip access, you can directly modify it to "%"
Create a user:
CREATE USER 'xxh'@'%' IDENTIFIED WITH mysql_native_password BY' xxh223 subscription subscription grant all on *. * to root@'%'identified by 'password' set up a root user to allow remote login
Check the user:
Select user, host, plugin, authentication_string from user\ G
Authorize all permissions:
GRANT ALL PRIVILEGES ON *. * TO 'xxh'@'%'
Authorize basic query and modify permissions, and set them as needed:
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON *. * TO 'xxh'@'%'
View user permissions.
Show grants for 'xxh'@'%'
LINUX
There are a few points to note:
1. After installing mysql, change the database encoding setting at / ect/my.cnf, and add the following fields
[mysql] default-character-set=utf8 [client] default-character-set=utf8 [mysqld] character-set-server=utf8
2. Initialize the security settings of the database: mysql_secure_installation to facilitate remote connection
3. Use Navicat to connect to the database.
Wonderful topic sharing:
Installation tutorials for different versions of mysql
Installation tutorials for each version of mysql5.7
Installation tutorials for each version of mysql5.6
Installation tutorials for each version of mysql8.0
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support 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.