Changes

From SME Server
Jump to navigationJump to search
671 bytes added ,  18:10, 8 April 2008
Restoring deleted MySQL root user
Line 41: Line 41:  
   /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < ./set.password
 
   /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < ./set.password
 
   runsvctrl u .
 
   runsvctrl u .
 +
 +
==== Restoring accidently deleted MySQL root user (SME 7.3/MySQL 4.1 only)====
 +
Note: The following is only applicable on SME 7.3 and MySQL 4.1
 +
  cd /var/service/mysqld
 +
  sv d .
 +
  echo 'use mysql;'>set.rootuser
 +
  echo -n 'INSERT INTO user VALUES("localhost","root","",'>>set.rootuser
 +
  echo '"Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","","","","",0,0,0);'>>set.rootuser
 +
  expand-template /root/.my.cnf
 +
  expand-template /var/service/mysqld/set.password
 +
  /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < set.rootuser
 +
  /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < set.password
 +
  sv u .
 +
 
    
=== Access MySQL from the local network ===
 
=== Access MySQL from the local network ===
501

edits

Navigation menu