Hozzunk létre adatbázist.
A már említett segédlet ezt írja:
$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname"
-> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> EXIT
Bye
$
Akkor menjünk végig Step-by-Step...Először is az első sor nálam ez:
root:~# /usr/local/mysql/bin/mysql -u root -p
És így működik is:Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.41 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Második sor:
mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.35 sec)
Rendben.Harmadik sor:
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@localhost -> IDENTIFIED BY mzperx;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-> IDENTIFIED BY mzperx' at line 1
Nem jó.A magyarázat (www.keithjbrown.co.uk/vworks/mysql/mysql_p6.php) szerint:
mysql> GRANT ALL PRIVILEGES
-> ON vworks.*
-> TO newuser@localhost
-> IDENTIFIED BY 'newpassword';
Próbáltam ez alapján is:mysql> GRANT ALL PRIVILEGES
-> ON wordpress.*
-> TO wordpress@localhost
-> IDENTIFIED BY mzperx;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mzperx' at line 4
de ez sem jó. Hol rontom el?(ezek a "", meg '', meg ilyenek állandóan megzavarnak)
Akkor ez?
mysql> GRANT ALL PRIVILEGES
-> ON wordpress.*
-> TO wordpress@localhost
-> IDENTIFIED BY 'mzperx';
Query OK, 0 rows affected (0,11 sec)
És az utolsó sor:
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,00 sec)
mysql> EXIT
Bye
root:~#
Eddig rendben van.Folyt. köv.
SP
Utolsó kommentek