Differences between revisions 2 and 3
Revision 2 as of 2018-07-20 04:22:01
Size: 446
Editor: PieterSmit
Comment:
Revision 3 as of 2019-05-13 20:15:50
Size: 576
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
 * list dbs {{{
MariaDB [(none)]> show databases;
   }}}
Line 11: Line 15:
   }}}

 * show tables in db {{{
MariaDB [shopify]> show tables

mysql (mariadb) command line notes

  • login

    $ mysql -uroot -pmypassword
  • list dbs

    MariaDB [(none)]> show databases;
  • use a db e.g. mysql for users

    MariaDB [(none)]> use mysql ;
  • show tables in db

    MariaDB [shopify]> show tables
  • view users and host

    MariaDB [mysql]> select user,Host,password from user ;
  • set password in console

    MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO root@192.168.70.1 IDENTIFIED BY 'mypassword' ;

...

MySql (last edited 2023-05-11 20:57:01 by PieterSmit)