Environment variable settings: Right-click my computer on the desktop and choose Properties> advanced> environment variables> double-click the path to add the C: \ mysql5.1.40 \ bin directory. If you want to use SDK development, add the lib and include directories to the corresponding lib and include environment variables;
Set environment variables. Choose Start> RUN> cmd to run mysqld, or directly switch to c: \ mysql5.1.40 \ bin to run the mysqld.exe service. Program You can also run it as a Service. Note that the MySQL installation directory should not contain Chinese characters or spaces. In SDK development, unexpected problems may occur in QT;
Install mysqld-install
Start the Service Net start MySQL
Stop Service. net stop MySQL
Delete service mysqld-Remove
Open a cmd window and run mysql-H localhost and press Enter.
{
Welcome to the MySQL monitor. commands end with; or \ G.
Your MySQL connection ID is 5
Server version: 5.1.40-Community MySQL Community Server (GPL)
Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.
}
Indicates that the MySQL database is successfully connected. Next, you can view the database,
-> Show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Test |
+ -------------------- +
2 rows in SET (0.01 Sec)
-> Use test;
Database changed
-- Constant expressions are supported in the same way as select 444 + 44 from dual in MSSQL or Oracle;
Mysql> select 444 + 44;
+ -------- +
| 444 + 44 |
+ -------- +
| 1, 488 |
+ -------- +
1 row in SET (0.00 Sec)