Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Cookie/Jar.php on line 63

Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Cookie/Jar.php on line 73

Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Cookie/Jar.php on line 89

Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Cookie/Jar.php on line 102

Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Cookie/Jar.php on line 111

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/webvol14/so/emm9jypq7227iqw/linuxkitchen.com/public_html/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91
MySQL komande – Linux, Windows, Heklanje, Kuhinja

Neke komande za rad sa MySQL bazom….

Kako se postavlja root lozinka prvi put (još neupotrebljavana baza) :
# mysqladmin -u root password “nova-lozinka”

Kako se iz glavne mysql baze brišu korisnici koji nemaju setovanu lozinku (pametno uraditi na novoformiranom MySQL serveru, gde baza još nije korišćena) :
mysql> use mysql
mysql> delete from user where Password=””;

Dodeliti pravo kačenja na server sa adrese “localhost” korisniku “nalog1”, čija je lozinka “lozinka1” :
mysql> grant usage on *.* to nalog1@localhost identified by “lozinka1”;
Paziti, ni u imenu ni u lozinci ne koristiti specijalne znakove (čak ni -), mysql to ne prihvata, i javiće grešku.

Kako određenom korisniku dati sva prava nad određenom MySQL bazom :
mysql> grant all privileges on ime-baze.* to ime-korisnika@localhost;

Pravljenje nove baze :
mysql> create database ime-nove-baze;

Logovanje u bazu :
# mysql -u root -p

Pokazivanje kolona u tabeli koja se zove “users” :
mysql> show columns from users;

Prikazivanje samo određenih polja iz tabele “users” :
mysql> select username,password from users;

Brisanje naloga (paziti! ovo je moguće tek kada se datom nalogu uklone sve privilegije) :
mysql> drop user korisnik1;

Prikazivanje dodeljenih prava naloga “korisnik1” :
mysql> show grants for ‘korisnik1’@’localhost’;

Uklanjanje svih privilegija dodeljenih nalogu “korisnik1” :
mysql> revoke all privileges, grant option from ‘korisnik1’@’localhost’;

Dodavanje novog naloga nad predhodno odabranom bazom :
mysql> grant usage on *.* to ‘korisnik1’@’localhost’ identified by ‘moja-lozinka’;

Kako pokazati sve dozvole date korisniku :
mysql> show grants for ‘korisnik1’@’localhost’;