Will ich bei Arktur abkucken…
Optionen von mysql unter Debian:
-u, --user=name User for login if not current user.
--database=db_name, -D db_name
The database to use. This is useful primarily in an option file.
--host=host_name, -h host_name
Connect to the MySQL server on the given host.
--password[=password] | password | The password to | |
| | | use when | |
| | | connecting to the | |
| | | server
Python?
Die folgende Anleitung habe ich auf dieser Seite gefunden. Ich habe sie erheblich gekürzt und an meine Bedürfnisse angepasst.
/etc/init.d/mysql stop
Mittlerweile sollte das mit
service mysql stop
gehen.
mysqld_safe --skip-grant-tables &
mysql -u root mysql
In MySQL command line prompt issue the following two commands:
UPDATE user SET password=PASSWORD("ualue=42") WHERE user="root";
FLUSH PRIVILEGES;
“ualue=42” is a common password for “The Hitchhiker’s Guide to the Galaxy” people which reads “Ultimate Answer to Life, the Universe, and Everything=42“
Look at „Step 1“.
Depending on the operating system (Unix-like examples):
/etc/init.d/mysql start
or:
service mysql start
Password is reset. Privileges are flushed. Start MySQL and login as root with the password set in step 4:
mysql -u root -p mysql