In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
3.1 Database connection management
Log in to the database system
Log in to the mysql database management system on the command line, where the "- h" parameter refers to the hostname of the connection, and since this is the connection to the local machine, the following is the localhost; "- u" parameter indicates the user name, where the user name is root: "- p" parameter refers to the user password. Press enter to display a password prompt
Mysql-h localhost-u root-p
3.2 introduction to the startup flow chart of the database
3.3.3.The mysql command, the interface has its own function (common examples)
\ h or help or?
* * mysql >\ h #? The effect is the same.
For information about MySQL products and services, visit: http://www.mysql.com/For developer information, including the MySQL Reference Manual, visit: http://dev.mysql.com/To buy MySQL Enterprise support, training, or other products, visit: https://shop.mysql.com/List of all MySQL commands:Note that all text commands must be first on line and end with'; (\?) Synonym for `help'.clear (\ c) Clear the current input statement.connect (\ r) Reconnect to the server. Optional arguments are db and host.delimiter (\ d) Set statement delimiter.edit (\ e) Edit command with $EDITOR.ego (\ G) Send command to mysql server, display result vertically.exit (\ Q) Exit mysql. Same as quit.go (\ g) Send command to mysql server.help (\ h) Display this help.nopager (\ n) Disable pager, print to stdout.notee (\ t) Don't write into outfile.pager (\ P) Set PAGER [to_pager]. Print the query results via PAGER.print (\ p) Print current command.prompt (\ R) Change your mysql prompt.quit (\ Q) Quit mysql.rehash (\ #) Rebuild completion hash.source (\.) Execute an SQL script file. Takes a file name as an argument.status (\ s) Get status information from the server.system (\!) Execute a system shell command.tee (\ T) Set outfile [to_outfile]. Append everything into given outfile.use (\ u) Use another database. Takes database name as argument.charset (\ C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.warnings (\ W) Show warnings after every statement.nowarning (\ w) Don't show warnings after every statement.For server side help, type 'help contents'**
Add\ G after the sql statement in 3. 4\ Gmysql to print the query results as columns. By default, the query results of mysql are output horizontally, with the column header in the first row, followed by the recordset
3.5c or CTRL+c means to cancel.
Mysql > asdfasdlkjlds\ c
3.6mysql command, source command using
Working with files in mysql
If these files contain sql statements, they are called "script files" or "batch files"
Use the SOURCE command
Mysql > source / root/world.sql
3.7 shutdown of mysql database
Method 1:
Mysqladmin-uroot-p123456 shutdown
Method 2:
Service mysqld stop
Method 3:
/ etc/init.d/mysqld stop
The fourth method is to use the system process management command to shut down mysql
Kill pid # pid here is the process number corresponding to the database service
Killall mysqld # where mysqld is the process name corresponding to the database
Pkill mysqld # where mysqld is the name of the process corresponding to the database service
3.8my.cnf profile description
Affect the startup of the server process
Affect the client program
Mysql program master configuration file
3.9 configuration file reading process
/ etc/my.cnf-- > / etc/mysql/my.cnf-- > $MYSQL_HOME/my.cnf-> defaults-extra-file=/tmp/clsn.txt-- > ~ / .my.cnf
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.