First, what is a database?
Database, can be regarded as short electronic file cabinets - electronic file storage premises, users can add the data file, capture, update, or delete operation.
We generally use are mysql database, it is open source, cross-platform database software.
Second, the classification of the database?
mysql, SQL Server, Oracle, DB2 is these types of relational database (RDBMS);
memcached, redis, mogoDB these types of non-relational databases (NOSQL).
Third, build a MYSQL database:
- Mysql database installation, and associated software through the official website and rhel7 CD.
- #systemctl restart mysqld
Four, mysql basic operations:
- mysql master profile: /etc/my.cnf;
- Mysql database directory of the default: / var / lib / mysql /;
- After the start mysql database, automatically create users and groups named mysql is, / etc / passwd / etc / group;
- #netstat -ntulp | grep mysqld // view the port number for the database, mysqld: 3306;
- #ps -C mysqld // View mysql process ID;
- #ls /var/log/mysqld.log // view the mysql log;
- After successful mysql structures, its initial password in the log file by [] grep password /var/log/mysqld.log filtered initial password;
- #mysql -hlocalhost -uroot -p 'password' // Log database
- mysql> \ h // Help
- mysql> alter user root @ localhost identified by "369happy-A" // Password: the numbers, uppercase and lowercase letters, characters
Fifth, modify password policy:
- mysql> show variables like "% password%"; // Find all the variables included in the password