@Panczo:
root@Ubuntu1:~# mysql -p -u tomasz
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 46
Server version: 5.5.54-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use tekst;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| tekst |
+------------+
1 row in set (0.00 sec)
mysql> CREATE TABLE `testowa` (`ID` INT NULL );
ERROR 1142 (42000): CREATE command denied to user 'tomasz'@'localhost' for table 'testowa'
Baza jest pusta, więc nie bardzo mam co pokazać ;).
@Haskell dodałem usera tomasz@localhost
mysql> SELECT user, host, password, select_priv, insert_priv, shutdown_priv, grant_priv FROM mysql.user;
+------------------+-----------+-------------------------------------------+-------------+-------------+---------------+------------+
| user | host | password | select_priv | insert_priv | shutdown_priv | grant_priv |
+------------------+-----------+-------------------------------------------+-------------+-------------+---------------+------------+
| root | localhost | *6C9421A5A5AB5FB033AAA12214CA985F7DB8601F | Y | Y | Y | Y |
| root | ubuntu1 | *6C9421A5A5AB5FB033AAA12214CA985F7DB8601F | Y | Y | Y | Y |
| root | 127.0.0.1 | *6C9421A5A5AB5FB033AAA12214CA985F7DB8601F | Y | Y | Y | Y |
| root | ::1 | *6C9421A5A5AB5FB033AAA12214CA985F7DB8601F | Y | Y | Y | Y |
| debian-sys-maint | localhost | *4EA490E67450A06F6B015DFB6E4A018A5241604E | Y | Y | Y | Y |
| tomasz | % | *BAD26D21ABF43663A863552EB77ECBDFF12524CA | Y | Y | Y | Y |
| tomasz | localhost | *21A41954AEDB3390924AA8EE2331EE49C2290BAC | N | N | N | N |
+------------------+-----------+-------------------------------------------+-------------+-------------+---------------+------------+
teraz po zalogowaniu na localhost
(tak jak w przykładzie wyżej) tabla została założona.
Pytanie dlaczego '%'
nie działa...