MySQL Installation
- Download the community version of the MySQL package (address), or Windows Installer
- To the target path by compressing the installation package
- Adding a target path to the system variable path
- Under the MySQL installation path, modify the configuration file Mysql-default.ini:
Basedir = C:\mysql\mysql (mysql directory)
DataDir = C:\mysql\mysql\data (mysql directory \data)
- Start cmd as an administrator, run the installation: Mysqld-install
- Start mysql:net start MySQL
- Login Mysql:mysql-u Root-p
- Change Password:mysql> update mysql.user set Password=password (' 123 ') where user= ' root ';
- Mysql> Flush Privileges
Table Operations
- Creating a CREATE TABLE [schema name].tablename (column_name data type default value, ...);
- Delete tables: DROP TABLE table_name;
- Rename table name: ALTER TABLE table_name rename to New_table_name;
- Add columns: ALTER TABLE tablename add ...;
- Modify columns: ALTER TABLE tablename modify ...;
- Delete column: ALTER TABLE tablename DROP column_name;
- Rename column name: ALTER TABLE tablename change Old_column_name new_column_name
"9-2" MySQL database installation