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 is about how linux operates mysql. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Try to study openfire and take a brief look at mysql by the way. Win can be downloaded and installed directly from the official website. Mysql has an operating interface. Under ubuntu, you can search for installation in the software center. It seems that there is no interface, only command operation, of course, you should be able to download the relevant client with interface.
1. Connect to the database
Mysql-u root-p
Then prompt for the password and enter the initial password set in three
two。 If you log in to the mysql database on the remote host
Mysql-h host address-u user name-p user password
3. You can create a database after logging in
Create database openfire
Grant the local host user (user name: test2, password: 123) access to the database (database name: openfire)
Grant all privileges on openfire.* to test2@localhost identified by "123"; flush privileges
four. Show a list of all databases
Show databases;5 . Open a database (such as database: openfire) use openfire;6. After opening the database, you can view the data table and display all the tables in the library show tables;7. Displays the structure describe table1;8 of a table (table1). Displays the record select * from table name in the table; 9. Exit unused instructions from mysqlexit and back up 10. Use the script to create the table mysql > create database mydb;mysql > use mydb;mysql > source E:\ dmc031217_db.sql11. Remotely manipulate the database ftp abc.sql to the server ssh to the server mysql-u abc-p use KKK (database name, if not create database KKK) set names' utf8' source abc.sql12. Start / usr/local/mysql/share/mysql.server start stop / usr/local/mysql/bin/mysqladmin-u root-p shutdown13 add new user format as follows: grant operation rights on database. * to username @ login host address identified by 'password' It means that a user on a host (with the login password of that user) is granted the right to perform certain operations on a database (1) for example, on any host ("%"), the user (user name: test1, password: adc) performs any operation on all databases (dangerous) grant all privileges on *. * to test1@ "%" identified by "abc" All privileges indicates the permissions to query, insert, modify and delete: select,insert,update,delete the above command is equivalent to: grant select,insert,update,delete on *. * to test1@ "%" identified by "abc"; then refresh permissions flush privileges;14 to update the password of the specified account (username: test1, new password: 1234) update mysql.user set password=password ('1234') where User= "test1" and Host= "localhost"; 15 delete users first use mysql database use mysql Delete a local user (test7) delete from user where User= "test7" and Host= "localhost" in the user table in the mysql database; 16 create the table use library name Create table table name (list of field settings); 17 delete drop database library name; 18 delete table drop table table name; 19 clear delete from table name from table records. Thank you for reading! This is the end of the article on "how linux operates mysql". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
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.