Welcome Guest.

2Answers

What user is generally used to start the Linux MySQL database

Asked by: Kimberly Taylor 219 views IT March 3, 2019

What user is generally used to start the Linux MySQL database

2 Answers

  1. +4Votes  

    Linux system into the mysql database method:
    Connection MYSQL:
    Format: mysql -h host address -u user name -p user password
    1, connected to the machine MYSQL.
    First open the DOS window, then enter the directory mysqlbin, then type the command mysql -uroot -p, after the carriage return prompts you to lose the password, if you just installed MYSQL, the super user root has no password, so directly enter You can enter MYSQL, the prompt of MYSQL is: mysql>
    2, connect to MYSQL on the remote host. Assume that the IP of the remote host is 110.110.110.110, the username is root, and the password is abcd123. Then type the following command:
    mysql -h110.110.110.110 -uroot -pabcd123 (Note: u and root can be used without spaces, others are the same)
    3, exit MYSQL command: exit (carriage return)
    An example of building a database and building a table and inserting data:
    create database school; //Create a library SCHOOL
    use school; //Open the library SCHOOL
    create table teacher //Create a table TEACHER
    (
    id int(3) auto_increment not null primary key, //id is set as the main keyword, and the value is automatically set, that is, when adding, you do not have to write the content to the ID field
    name char(10) Not null,
    address varchar(50) default ‘Shenzhen’, //Set the default value to Shenzhen
    year date
    ); //Build the end of the table
    //The following is the insertion field
    Insert into teacher values(”,’glchengang’, ‘Jianping Yizhong’, ‘1976-10-10’); //ID does not need to write content
    insert into teacher values(”,’jack’,’ Ping Yizhong ‘, ‘1975-12-23’);

    Sharon- March 3, 2019 |

  2. +5Votes  

    We generally build a mysql user

    Steven Martin- March 3, 2019 |