MySql: Give Root User Logon Permission From Any Host MySql: Daj Root User Logon Permission From Vsak Host
Note that this is Not very secure, and should only be used for a local development box where you don't feel like setting up individual permissions, but still need to connect from other machines. Upoštevajte, da to ni zelo varna, in se mora uporabiti samo za lokalne razvojne škatle, kjer se ne počutite kot na primer ustanovitev posameznih dovoljenj, vendar še vedno treba povezati z drugimi stroji.
To configure this feature, you'll need to update the mysql user table to allow access from any remote host, using the % wildcard. Če želite nastaviti to funkcijo, boste morali posodobiti mysql tabelo uporabniku, da omogoči dostop do katerega koli oddaljenim gostiteljem, ki uporabljajo nadomestni%.
Open the command-line mysql client on the server using the root account. Odprite ukazno vrstico mysql odjemalca na strežnik z uporabo root račun.
mysql -uroot mysql-uroot
Then you will want to run the following two commands, to see what the root user host is set to already: Potem boste želeli zagnati naslednjih dveh ukazov, da bi videli, kaj je gostiteljica uporabnik root že nastavljena na:
use mysql; uporabo mysql;
select host, user from user; izberite gostitelj, uporabniško od uporabnika;
Here's an example of the output on my database, which is pretty much the default settings. Tukaj je primer proizvodnje na mojo zbirko podatkov, ki je precej privzetimi nastavitvami. Note that ubuntuserv is the hostname of my server. Upoštevajte, da je ubuntuserv hostname mojega strežnika.
mysql> use mysql; mysql> uporabo mysql;
Reading table information for completion of table and column names Branje preglednice podatkov za izpolnitev tabele in imena stolpcev
You can turn off this feature to get a quicker startup with -A Lahko izklopiti to funkcijo, da bi dobili hitreje začetek s -
Database changed Database spremenjenomysql> select host,user from user; mysql> izberite gostiteljice, uporabniški od uporabnika;
+—————+——————+ +-----+------+
| host | user | | Gostiteljica | uporabnik |
+—————+——————+ +-----+------+
| ubuntuserv | root | | Ubuntuserv | koren |
| localhost | debian-sys-maint | | Localhost | debian-sys-maint |
| localhost | root | | Localhost | koren |
+—————+——————+ +-----+------+
3 rows in set (0.00 sec) 3 vrstic v set (0,00 sek)
Now I'll update the ubuntuserv host to use the wildcard, and then issue the command to reload the privilege tables. Zdaj bom posodobite ubuntuserv gostiteljica za uporabo wildcard, in nato izda ukaz, da osvežite privilegijev tabel. If you are running this command, substitute the hostname of your box for ubuntuserv. Če uporabljate ta ukaz, nadomesti hostname vašega polja za ubuntuserv.
update user set host='%' where user='root' and host='ubuntuserv'; update uporabnik iz host = '%', če uporabnik = "root" in host = 'ubuntuserv';
flush privileges; flush privilegije;
That's all there is to it. To je vse, kar je z njo. Now I was able to connect to that server from any other machine on my network, using the root account. Zdaj sem mogel povezati s strežnikom, da od katere koli druge naprave v omrežju, pri čemer root račun.
Again, note this isn't very secure, and you should at least make sure that you've Tudi, upoštevajte, da to ni zelo varno, in morate vsaj prepričajte, da ste set a root password določiti root geslo . .

Daily Email Updates Dnevni Email Updates
You can get our how-to articles in your inbox each day for free. Lahko dobite našo kako do člankov v vašo mapo »Prejeto vsak dan brezplačno. Just enter your name and email below: Preprosto vpišite vaše ime in e-pošto spodaj:



I'm not exactly sure *why* you would want to do this. Nisem povsem prepričan * * Zakaj bi si želeli, da to storijo. IP based authentication is an extremely useful security feature, disabling it – especially for the root user – is probably a bad idea. IP preverjanje pristnosti na podlagi je zelo uporaben element varnosti, onesposobiti je - še posebej za root uporabnik - je verjetno slaba ideja.
That said, there really isn't anything wrong with allowing a limited user account access from every IP. To je dejal, da res ni nič narobe z omogočajo dostop omejen uporabnik račun iz vsake IP.
daniel, daniel,
That's why I noted that it isn't very secure a number of times =) Zato sem ugotovil, da ni preveč varno večkrat =)
I appreciated this. Jaz uvaževati to. It has been a while since I have had to build a project from scratch. Ugotovljeno je bilo, pa saj sem moral zgraditi projekt, iz nič. With this reference, I can now get on with development. S to reference, morem zdaj zaslužiti na z razvojem. Later, I will absolutely want to lock down for my customer. Kasneje bom absolutno želeli zaklepanje določitvi za mojo stranko. Then I hope to find another reference solution just as easily. Potem sem upanje, da bi našli druge referenčne raztopine prav tako enostavno.
Actually implementing IP based authentication may not be the best answer for me due to the environment I will be in, but I will be investigating it. Pravzaprav izvajanju IP pristnosti ne smejo biti najboljši odgovor za mene zaradi okolja bom, toda jaz bom to preiskavo. Simple is the essence of effectiveness for me. Enostavno je bistvo učinkovitosti zame.
And I do not plan on giving out the root password. In jaz ne nameravate na navajate root geslo. Isn't that a measure of security? Ali ni to merilo varnosti?