Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

MySql: Give Root User Logon Permission From Any Host MySQL: Give Root User Logon atļauju katrā mītnes

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. Ņemiet vērā, ka šis nav pilnīgi droša, un jāizmanto tikai par vietējās attīstības paketi, kur nejūtos kā izveidot atsevišķas atļaujas, taču joprojām ir nepieciešama, lai izveidotu savienojumu no citām mašīnām.

To configure this feature, you'll need to update the mysql user table to allow access from any remote host, using the % wildcard. Lai konfigurētu šo funkciju, jums vajadzēs atjaunināt mysql lietotāja tabulu, lai varētu piekļūt no jebkuras attālināto datoru, izmantojot% aizstājējs.

Open the command-line mysql client on the server using the root account. Open komandrindas mysql klienta uz serveri, izmantojot root kontu.

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: Tad tu vēlēsies palaist divas komandas, lai redzētu root lietotāja uzņēmējas ir noteikts jau:

use mysql; izmantot mysql;
select host, user from user; Izvēlieties uzņēmējas, lietotāju no lietotāju;

Here's an example of the output on my database, which is pretty much the default settings. Šeit ir par produkciju par manu datu bāzes, piemēram, kas ir diezgan daudz noklusējuma iestatījumus. Note that ubuntuserv is the hostname of my server. Ievērojiet, ka ubuntuserv ir resursdatora mana servera.

mysql> use mysql; mysql> Lietot mysql;
Reading table information for completion of table and column names Lasījums tabulas informācija pabeigšanai tabulu un kolonnu nosaukumi
You can turn off this feature to get a quicker startup with -A Jūs varat izslēgt šo iespēju, lai iegūtu ātrāku sāknēšanas with -
Database changed Database mainīts

mysql> select host,user from user; mysql> Izvēlieties uzņēmējas, lietotāju no lietotāju;
+—————+——————+ +-----+------+
| host | user | | Host | lietotājam |
+—————+——————+ +-----+------+
| ubuntuserv | root | | Ubuntuserv | Sakne |
| localhost | debian-sys-maint | | Localhost | debian-sis-maint |
| localhost | root | | Localhost | Sakne |
+—————+——————+ +-----+------+
3 rows in set (0.00 sec) 3 rindas in set (0.00 sec)

Now I'll update the ubuntuserv host to use the wildcard, and then issue the command to reload the privilege tables. Tagad es ņemšu update ubuntuserv uzņēmēja izmantot aizstājējzīmes, un pēc tam izdod komandu pārlādēt privilēģiju tabulām. If you are running this command, substitute the hostname of your box for ubuntuserv. Ja jūs strādājat ar šo komandu, aizvietot resursdatora jūsu lodziņa ubuntuserv.

update user set host='%' where user='root' and host='ubuntuserv'; update lietotāja iestatītā host = '% ", kur user =' root 'un host =' ubuntuserv ';
flush privileges; flush privilēģijas;

That's all there is to it. Tas viss notiek ar to. Now I was able to connect to that server from any other machine on my network, using the root account. Tagad man bija iespēja pieslēgties šim serverim, no jebkura cita mašīna manā tīklā, kas izmanto root kontu.

Again, note this isn't very secure, and you should at least make sure that you've Atkal, ņemiet vērā, tas nav pilnīgi droša, un jums vajadzētu vismaz pārliecināties, ka jūs esat set a root password noteikt root parole . .

This article was originally written on 02/9/07 Tagged with: Šis pants tika sākotnēji rakstīts uz 02/9/07 tagged with: Database Database , , MySQL MySQL , , Programming Programmēšana

Daily Email Updates Daily Email Updates

You can get our how-to articles in your inbox each day for free. Jūs varat saņemt mūsu how-to rakstus savā pastkastītē katru dienu par brīvu. Just enter your name and email below: Vienkārši ievadiet jūsu vārdu un e-pasta zemāk:


Name: Vārds:
Email: E-pasts:

Comments (3) Komentāri (3)

  1. daniel daniel

    I'm not exactly sure *why* you would want to do this. Es neesmu pilnīgi pārliecināts, * kādēļ * Jūs vēlaties to darīt. IP based authentication is an extremely useful security feature, disabling it – especially for the root user – is probably a bad idea. IP bāzes autentifikāciju ļoti noderīga drošības līdzeklis, atspējošanas to - īpaši root lietotājs - iespējams, ir slikta ideja.

    That said, there really isn't anything wrong with allowing a limited user account access from every IP. Tas nozīmē, ka tiešām nav kaut kas kārtībā ar atļauj ierobežotu lietotāja kontu piekļuves katram IP. :-)

  2. The Geek Geek

    daniel, Daniel,

    That's why I noted that it isn't very secure a number of times =) Tas ir iemesls, kāpēc es atzīmēja, ka tā nav ļoti droša vairākas reizes =)

  3. Juan Juan

    I appreciated this. I appreciated to. It has been a while since I have had to build a project from scratch. Tas ir, bet kopš man ir bijusi veidot projektu no nulles. With this reference, I can now get on with development. Ar šo norādi, tagad varu saņemt par ar attīstību. Later, I will absolutely want to lock down for my customer. Vēlāk, es absolūti gribu, lai bloķētu noteiktas manu klientu. Then I hope to find another reference solution just as easily. Tad es ceru atrast citu standartšķīdumu tikpat viegli.

    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. Faktiski īstenošanas pamatā ir IP autentifikācija var nebūt labākā atbilde uz mani, jo vide man būs, bet man būs pēta to. Simple is the essence of effectiveness for me. Vienkāršais ir efektivitātes būtība man.

    And I do not plan on giving out the root password. Un man nav plānu, kurā izklāstīti root parole. Isn't that a measure of security? Nav ka pasākums drošību?


Our Friends Our Friends
Getting Started Getting Started


About How-To Geek Par How-To Geek
What Is That Process? Kas ir šis process?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Copyright © 2006-2009 HowToGeek.com. All Rights Reserved. All Rights Reserved.