MySQL Primer learning (i)

Source: Internet
Author: User
Tags ini interface log mysql mysql commands mysql in requires linux
MySQL MySQL introduction learning (i) installation article

Php+mysql+linux is now becoming a classic combination of small Web servers. Building and debugging MySQL databases in a indows environment is a preferred option for many web developers. I am in the WINDOWS98 environment to learn MySQL, now the learning process and experience summed up for your reference.

1, download mysql-3.23.35-win.zip and decompression;

2, run Setup.exe, choose D:\mysql, "tyical Install"

3, start MySQL, there are the following methods:

Method One: Use Winmysqladmin
1, into the D::\mysql\bin directory, run Winmysqladmin.exe, in the lower right corner of the screen in the taskbar will have a red symbol
2, the left mouse button click on the picture, select "Show Me", the "winmysqladmin" Operation interface; a dialog box appears in the middle of the first run that requires you to enter and set your username and password
3), select "My.ini Setup"
4), select "Mysqld-opt" (Win9x) or "mysqld-nt" in "Mysqld file" (WinNT)
5), select "Pick-up or edit My.ini values" To edit your My.ini file in the right window
6), choose "Save modification" to save your My.ini file
7, if you want to quickly use Winmysqladmin (automatically run on the boot), select "Create shortcut on Start menu"
8), test:
Enter the DOS interface;
Run MySQL in the D:\mysql\bin directory and enter the MySQL interactive interface
Enter show databases and return to the screen showing the current two database MySQL and test

Method Two: Do not use Winmysqladmin
1, under the DOS window, into the D:/mysql/bin directory
2) run under Win9x:
Mysqld
Run under NT:
Mysqld-nt--standalone
3), since then, MySQL in the background to run
4), test MySQL: (under the D:/mysql/bin directory)
a), mysqlshow
Show existing two databases when normal MySQL and test
b), mysqlshow-u root MySQL
Display database MySQL Five tables in normal time:
Columns_priv
Db
Host
Tables_priv
User
c), mysqladmin version status proc
Display version number, status, process information, etc.
d), MySQL test
Enter the MySQL operation interface, the current database is test
5), MySQL shutdown method:
Mysqladmin-u Root shutdown

4. At this point, MySQL has been successfully installed, then you can familiarize yourself with the common MySQL commands and create your own database

Some useful options and commands that are common to MySQL
MYSQLD-----Turn on log support
--log
--log-update
--log-long-formart
MySQL
Grant all on database.* to user identified by "password" creates a new user, giving all permissions to its database databases
Revoke all in database from user removes all permissions on the database for user users
Mysql-uroot-p--one-database databasename < file.sql Import SQL statements from File.sql files to databasename this database
Mysqladmin
Mysqladmin flush-logs Command mysqld reopen a new log file, which is to empty the old log file, equivalent to reincarnation
Mysqldump
--add-drop-table Add droptable if EXISTS statement when exporting SQL statements
--quick Fast Export
--opt optimization Options (recommended)
Myisamchk
Check table Options
--extend-check Extended Check
A check option for the--medium-check speed comparison tradeoff
Fix table Options
--recover Repair Table File
--safe-recover Security Repair table file, slower than--recover
Cosmetic Repair Table Entry
--force force clears the last temporary file
--quick is only repaired according to the content of the element primer file
Management of MySQL
You can use phpMyAdmin (which requires PHP's environment support) and MYSQLCC (Linux graphical interface support, Windows system support)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.