Changes

From SME Server
Jump to navigationJump to search
408 bytes added ,  20:05, 4 July 2022
Line 107: Line 107:  
  systemctl stop mariadb
 
  systemctl stop mariadb
 
  /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables
 
  /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables
 
+
{{warning box| be careful that mariadb will be running without any user auth, if it is open to outside of your server, then you might want to close this access first, and keep this session as short as possible }}
 
then use mysql command line
 
then use mysql command line
 
  mysqlcheck mysql
 
  mysqlcheck mysql
Line 125: Line 125:  
  mysql mysql < /home/e-smith/db/mysql/mysql.user.dump
 
  mysql mysql < /home/e-smith/db/mysql/mysql.user.dump
 
  expand-template /var/service/mysqld/set.password
 
  expand-template /var/service/mysqld/set.password
  /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < /var/service/mysqld/set.password
+
  mysql mysql < /var/service/mysqld/set.password
 
  mysqladmin shutdown
 
  mysqladmin shutdown
 
  systemctl start mariadb
 
  systemctl start mariadb
 +
 +
{{warning box| the line dumping the table mysql.user to the mariadb server will delete any existing entries in the table if you are using the default SME dump as it has a DROP TABLE IF EXISTS line. So do this only if you know what you are doing.}}
    
==Access MariaDB/MySQL using port from the localhost and local network==
 
==Access MariaDB/MySQL using port from the localhost and local network==
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,254

edits

Navigation menu