Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ MySQL simple operation notes under Linux     - Install NetBeans IDE 8.0 on Ubuntu, Linux Mint, Elementary OS, and Debian (Linux)

- Use Aptik Battery Monitor monitoring Ubuntu laptop battery usage (Linux)

- Changes in C # asynchronous programming model (Programming)

- Use SocketServer write a sockets program (Programming)

- MariaDB phpMyAdmin installation and configuration issues to resolve under CentOS7 (Database)

- Linux iptables firewall settings (Linux)

- Github Getting Started Basic Course (Linux)

- Android SDK Manager can not update the domestic solutions (Linux)

- Slice MyCAT common fragmentation rules of enumeration (Database)

- To install MySQL on Linux (Database)

- Linux, modify / etc / profile file (Linux)

- Linux keyboard recording script (Linux)

- CentOS / Linux NIC set IP address configuration (Linux)

- Linux performance monitoring and common commands Introduction (Linux)

- Shell scripts quickly deploy Tomcat project (Server)

- Offline (local) Yum source structures (Linux)

- EChart simple and practical control on chart (Programming)

- Mac OS X system setup Google Go language development environment configuration tool Sublime Text 2 (Linux)

- Oracle Enterprise Linux 64-bit install apache-tomcat-7.0.53 step (Server)

- Iptables application layer plug (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

skip-grant-tables

[Mysqld_safe]

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.
     
         
       
         
  More:      
 
- Based shell: using read, the command-line script to achieve mass participation and input two integer calculation (Programming)
- Oracle 11R2 Grid Infrastructure execute root.sh script rootcrs.pl execution failed treatment (Database)
- PostgreSQL using the system cache to improve operational efficiency (Database)
- Linux batch copy data script (Linux)
- Oracle11g CRS-0184 Problem Solving (Database)
- MySQL tmpdir parameter modification (Database)
- Installation and Configuration JDK8 In CentOS 7 (Linux)
- Linux Services Comments (Linux)
- Encounter ORA-00600: internal error code, arguments: [4194] ORA-1552 (Database)
- Using Linux strace command trace / debug a program commonly used options (Linux)
- Linux Operating System Security Study (Linux)
- HDFS Hadoop Distributed File System Works (Server)
- Linux script to copy the folder to all folders with the same name (Linux)
- Use Visual Studio Code Development TypeScript (Linux)
- VMWare virtual machine without rebooting way to add virtual disk (Linux)
- Configuring LIDS build Linux kernel security intrusion detection system (Linux)
- Linux dmidecode command detail (Linux)
- File compression and packaging commands under Linux (Linux)
- Oracle table of nested loop connection (Database)
- Android Studio commonly used shortcuts and how to follow the Eclipse Shortcuts (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.