Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MySQL simple operation notes under Linux     - An Analysis of the C Algorithm for Calculating the Number of Days Between Date (Programming)

- Ubuntu users install the Download Manager software Xdman 5.0 (Linux)

- Oracle 11g logical standby achieve BI needs (Database)

- Linux rename command usage in learning to modify the file name (Linux)

- ethtool command Detailed (Linux)

- Amazon EC2 server using Rsync + Inotify real-time synchronization (Server)

- Linux Mint 17.2 64 bit installation Docker and management software seagull (Linux)

- Linux signal and orphans, and zombie process (Programming)

- Java in several ways of using MongoDB (Programming)

- Android annotation support (Support Annotations) (Programming)

- Oracle user password problem (Database)

- 10 Regulation of painless SQL Schema (Database)

- Java memory area Explanation (Programming)

- Linux Network Programming - libnet Guide (Programming)

- Ubuntu 15.04 installation MATE 1.10 (Linux)

- MongoDB fragmentation (Cluster) (Database)

- top command causes the system load increases (Linux)

- Linux Network Statistics Tools / Command (Linux)

- PHP call a Python program (Programming)

- The ActiveMQ JMS installation and application examples for Linux (Linux)

  MySQL simple operation notes under Linux
  Add Date : 2018-11-21      
  Said that under Linux the MySQL large simple applications.

Installing MySQL

1, you can directly mount the CD directly after good yum install, and then start the MySQL service

chkconfig mysqld on // ensure that the next server start MySQL service start

service mysqld start // Start MySQL service

2, just start the MySQL service, the system will automatically give us a user name and password, user name is root, the corresponding password is empty.

First landing time

mysql -uroot -p

Then you can directly enter into the landing.

3, if we want to give the initial root user a password, the following operations:

#mysqladmin -uroot password 'password' // 'password' is the password of your own department set.

After entering into the MySQL, user added

mysql> insert into mysql.user (host, user, password) values ( 'localhost', 'kong', 'exit');

flush privileges;

ok, add a new user, the user name is kong, the password is exit.

4, modify the user's password, just to create a good user kong Case

mysql> set password for 'kong' @ 'localhost' = password ( '123456');

mysql> flush privileges;

5, when forgotten the root password, you can perform the following operations.

vi /etc/my.cnf[mysqld]

datadir = / var / lib / mysql

socket = / var / lib / mysql / mysql.sock

user = mysql

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links = 0



log-error = / var / log / mysqld.log

pid-file = / var / run / mysqld / mysqld.pid

The above authorization skipped table, and then restart the MySQL service.

Directly after login mysql

After modifying root password

mysql> use mysql;

mysql> update user set password = password ( 'exit') where user = 'root';

mysql> flush privileges;

After exiting mysql service, modify the configuration file removed skip-grant-tables, restart the mysql service. Here you can use the new password to login.
- Ubuntu Server (Ubuntu 14.04 LTS 64-bit) installation libgdiplus 2.10.9 error solution (Linux)
- Install and use automated tools Ansible in CentOS 7 (Linux)
- Ubuntu 32 compile Android 4.0.4 Problems (Linux)
- PostgreSQL Select source code analysis (Database)
- Compression decompression command under Linux (Linux)
- Spark parquet merge metadata problem (Server)
- RM Environment Database RMAN Backup Strategy Formulation (Database)
- Oracle ORA-01089 failure analysis (Database)
- mysql_config_editor encryption and decryption of the new features of MySQL realization (Database)
- PostgreSQL 9.4.3 Installation and Configuration under CentOS 6.5 (Database)
- How to choose the correct HTTP status code (Server)
- Using DBMS_STAT function closes mission (Database)
- Linux Basics Tutorial: Linux Kickstart automated installation (Linux)
- Linux Learning Notes: Users and Groups (Linux)
- Tomcat configuration memory and remote debug port (Server)
- Efficient running Linux virtual machine Six Tips (Linux)
- Ubuntu Tutorial - Manually install Oracle Java JDK 8 (Linux)
- Oracle Automatic Diagnostic Repository (Automatic Diagnostic Repository, ADR) (Database)
- W and uptime command (Linux)
- Enterprise Encrypting File System eCryptfs Comments (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.