Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MySQL simple operation notes under Linux     - Hadoop2.6.3 build clusters and the development of MapReduce WIN7 by Eclipse on Linux demo (Server)

- System Security: Build Linux with LIDS steel castle (Linux)

- Effect MongoDB plan cache (Database)

- Oracle11g Trigger Debugging Record Error: PLS-00201: identifier SYS.DBMS_SYSTEM 'must be declared (Database)

- How to fix Not Enough Free Disk Space On / boot on Ubuntu (Linux)

- Install Ubuntu text editor KKEdit 0.2.10 (Linux)

- Linux basis: a comprehensive study pwd command (Linux)

- Can not empty the Recycle Bin to repair problems in Ubuntu 14.04 (Linux)

- Java multi-threaded communications pipeline flow (Programming)

- Orionode source Linux Mint installation (Linux)

- Share useful bash aliases and functions (Linux)

- Volatile keyword in C language understanding (Programming)

- The most commonly used Linux commands (Linux)

- MySQL Installation Troubleshooting (Database)

- Upgrade to Linux Mint 16 petra Mint 17 Qiana (Linux)

- Simple to install Tor browser to Ubuntu 14.04 and Linux Mint 17 (Linux)

- Oracle Automatic Diagnostic Repository (Automatic Diagnostic Repository, ADR) (Database)

- exp / imp Export Import version of the problem and the ORA-6550 error (Database)

- CentOS Linux build SVN server (Server)

- Ubuntu 14.10 How to install office suite Calligra Suite 2.8.7 (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.
- Linux group account deletion, and other related operations (Linux)
- MariaDB 10.1 and MySQL 5.7 in general performance on commodity hardware (Database)
- Linux Basics Tutorial: create your own Vim IDE (Linux)
- Android use canvas board painting (Programming)
- Getting case of Python Hello World (Programming)
- Use SecureCRT to transfer files between local and remote hosts (Linux)
- Oracle GoldenGate encryption (Database)
- How to defragment the hard disk in Linux (Linux)
- FileZilla FTP && TLS connection settings of (Linux)
- Oracle data files deleted recover after physical (Database)
- Oracle query start with connect by tree (Database)
- JITwatch installation under Linux (Linux)
- CentOS 6.4 install and configure Squid Proxy Server (Linux)
- build Android environment on Ubuntu 12.04 (Server)
- Git commands (Linux)
- Hadoop - Task Scheduling System Comparison (Server)
- Oracle Linux 6.4 installed Oracle 11gR2 + RAC + ASM (Database)
- CentOS 6/7 Series Docker Installation (Linux)
- How LUKS encrypted disk / partition to perform remote incremental backup (Linux)
- Ubuntu 15.04 and CentOS 7 to deploy .NET, Mono and DNX (Server)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.