Changes
From SME Server
Jump to navigation
Jump to search
← Older edit
Newer edit →
MySQL
(view source)
Revision as of 17:10, 8 April 2008
671 bytes added
,
17: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 ===
Mweinber
501
edits
Navigation menu
Page actions
Page
Discussion
View source
History
Page actions
Page
Discussion
More
Tools
In other languages
Personal tools
English
Log in
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version
Search