1 MySQL 101 MySQL 101 MySQL (play /ma skju l/ "My S-Q-L", ɪ ˌɛ ːˈɛ [3] officially, but also incorrectly called /ma ɪ si kwəl/ "My Sequel") is the world's most ˈ ː used[4] relational database management system (RDBMS)[5] that runs as a server providing multi-user access to a number of databases. The SQL phrase stands for Structured Query Language.[7] – Wikipedia Http://slideshare.net/davestokes/presentations
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
MySQL 101MySQL 101MySQL (play /ma skju l/ "My S-Q-L",ɪ ˌɛ ːˈɛ
[3] officially, but also incorrectly called /ma ɪsi kwəl/ "My Sequel") is the world's most ˈ ːused[4] relational database management system (RDBMS)[5] that runs as a server
providing multi-user access to a number of databases. The SQL phrase stands for
Structured Query Language.[7] – Wikipedia
Http://slideshare.net/davestokes/presentations
2
AgendaAgenda➔ Installation➔ Starting MySQL➔ Stopping MySQL➔ Connecting to MySQL➔ Loading data➔ Looking at data➔ Backup➔ Login/Authentication➔ Where to go from here➔ Suggestions➔ Questions and Answers
BinariesBinariesshell> groupadd mysqlshell> useradd -r -g mysql mysqlshell> cd /usr/localshell> tar zxvf /path/to/mysql-VERSION-OS.tar.gzshell> ln -s full-path-to-mysql-VERSION-OS mysqlshell> cd mysqlshell> chown -R mysql .shell> chgrp -R mysql .shell> scripts/mysql_install_db --user=mysqlshell> chown -R root .shell> chown -R mysql data# Next command is optionalshell> cp support-files/my-medium.cnf /etc/my.cnfshell> bin/mysqld_safe --user=mysql &# Next command is optionalshell> cp support-files/mysql.server /etc/init.d/mysql.server
Starting MySQLStarting MySQLshell> bin/mysqld_safe --user=mysql & This command is what starts your MySQL server. It runs a wrapper script as user mysql in the background. You might also see this wrapper wrapped
Looking At DataLooking At Data mysql> show tables; mysql> select * from City; mysql> SELECT Name, CountryCode --> FROM City → WHERE Population > 10000000;
20
BackupBackup Physical versus logical
Many options, many tools Restoration from backup needs to be tested
mysql> select * from user where User='joe' limit 1\G*************************** 1. row *************************** Host: % User: joe Password: Select_priv: N Insert_priv: N Update_priv: N Delete_priv: N Create_priv: N Drop_priv: N Reload_priv: N Shutdown_priv: N Process_priv: N File_priv: N Grant_priv: N References_priv: N Index_priv: N Alter_priv: N Show_db_priv: N Super_priv: N Create_tmp_table_priv: N Lock_tables_priv: N Execute_priv: N Repl_slave_priv: N Repl_client_priv: N Create_view_priv: N Show_view_priv: N Create_routine_priv: N Alter_routine_priv: N Create_user_priv: N Event_priv: N Trigger_priv: NCreate_tablespace_priv: N ssl_type: ssl_cipher: x509_issuer: x509_subject: max_questions: 0 max_updates: 0 max_connections: 0 max_user_connections: 0 plugin: authentication_string: NULL
Yes, you can type in the settings for a new account by hand but it is easy to fat finger one of the thirty privs.
Other tools have similar features and you should use them to avoid dumb errors.
25
Where To Go From HereWhere To Go From Here
Training Classes
Mysql.com/training Local user groups or colleges
Webinars Conferences
MySQL Connect/Oracle Open World MySQL Innovation Day (Webcast) SELF
Planet.MySQL.Com Forums.MySQl.Com
26
SuggestionsSuggestions MySQL
Administrator's Bible – Sheeri Cabral
27
Also SuggestedAlso SuggestedHigh Performance MySQL- Schwartz, Zaitsev, and Tkachenko
3rd Edition!!!
28
A New SeriesA New SeriesEffective MySQL Backup and Recovery, Effective MySQL Optimizing Statements, Ronald Bradford
29
MySQL CertificationMySQL CertificationAging but stillthe CertificationGuide