The current non-installed version is v5.1.40 downloaded from MySQL.com. The downloaded version is a ZIP package, which is decompressed to the C: MySQL5.1.40 directory. Next, set the system environment variables, fortunately, MySQL is used in the CMD command line.
The current non-installed version is v5.1.40 downloaded from MySQL.com. The downloaded version is a ZIP package, which is decompressed to the C: \ MySQL5.1.40 directory. Next, set the system environment variables, fortunately, MySQL is used in the CMD command line.
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 the environment variables, choose Start> RUN> CMD, run MySQLD, or directly switch to C: \ MySQL5.1.40 \ bin to run the mysqld.exe service program, or 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)