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 zgody użytkownika logowania od dowolnego hosta

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. Pamiętaj, że nie jest to bardzo bezpieczna i powinna być stosowana tylko na lokalnym polu rozwoju, gdzie nie czujesz się jak tworzenie indywidualnych zezwoleń, ale muszą się łączyć z innymi maszynami.

To configure this feature, you'll need to update the mysql user table to allow access from any remote host, using the % wildcard. Aby skonfigurować tę funkcję, musisz zaktualizować mysql tabeli użytkownika, aby umożliwić dostęp z dowolnego hosta zdalnego, używając symboli%.

Open the command-line mysql client on the server using the root account. Open linii poleceń klienta MySQL na serwerze przy użyciu konta administratora.

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: Wtedy chcesz uruchomić po dwa polecenia, aby zobaczyć, co przyjmującego roota jest ustawiona na już:

use mysql; use mysql;
select host, user from user; Wybierz hosta, użytkownik od użytkownika;

Here's an example of the output on my database, which is pretty much the default settings. Oto przykładowy wynik w mojej bazie danych, która jest dość dużo ustawień domyślnych. Note that ubuntuserv is the hostname of my server. Należy pamiętać, że ubuntuserv to nazwa mojego serwera.

mysql> use mysql; mysql> use mysql;
Reading table information for completion of table and column names Odczyt informacji tabeli należy wypełnić tabelę i nazw kolumn
You can turn off this feature to get a quicker startup with -A Możesz wyłączyć tę funkcję, aby uzyskać szybsze starcie z -
Database changed Database changed

mysql> select host,user from user; mysql> SELECT host, użytkownik od użytkownika;
+—————+——————+ +-----+------+
| host | user | | Host | User |
+—————+——————+ +-----+------+
| ubuntuserv | root | | Ubuntuserv | root |
| localhost | debian-sys-maint | | Localhost | debian-sys-maint |
| localhost | root | | Localhost | root |
+—————+——————+ +-----+------+
3 rows in set (0.00 sec) 3 rows 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. Teraz będę aktualizacja ubuntuserv hosta do korzystania z symboli, a następnie wydać polecenie, aby odświeżyć tabele uprawnień. If you are running this command, substitute the hostname of your box for ubuntuserv. Jeśli używasz tego polecenia, zastąpić nazwę hosta z pola do ubuntuserv.

update user set host='%' where user='root' and host='ubuntuserv'; aktualizacja przyjmującego set user = '%', gdzie user = 'root' i host = 'ubuntuserv ";
flush privileges; flush privileges;

That's all there is to it. To wszystko było na tyle. Now I was able to connect to that server from any other machine on my network, using the root account. Teraz udało mi się podłączyć do tego serwera z innych maszyn w sieci, korzystając z konta administratora.

Again, note this isn't very secure, and you should at least make sure that you've set a root password ustawić hasło roota . .

This article was originally written on 02/9/07 Tagged with: Ten artykuł został napisany na 02/9/07 Tagged with: Database Baza danych , , MySQL MySQL , , Programming Programowanie

Daily Email Updates Daily Email Updates

You can get our how-to articles in your inbox each day for free. Możesz pobrać nasze instrukcje postępowania w skrzynce odbiorczej codziennie za darmo. Just enter your name and email below: Wystarczy podać swoje imię i adres e-mail:


Name: Imię i nazwisko:
Email: E-mail:

Comments (3) Komentarze (3)

  1. daniel daniel

    I'm not exactly sure *why* you would want to do this. Nie jestem dokładnie pewny * * Dlaczego nie chcesz tego robić. IP based authentication is an extremely useful security feature, disabling it – especially for the root user – is probably a bad idea. IP uwierzytelnianie oparte jest niezwykle przydatna funkcja bezpieczeństwa, wyłączając ją - szczególnie dla użytkownika "root" - jest prawdopodobnie złym pomysłem.

    That said, there really isn't anything wrong with allowing a limited user account access from every IP. To powiedział, tak naprawdę nie jest nic złego z umożliwiające ograniczony dostęp do konta z każdego IP. :-)

  2. The Geek Geek

    daniel, Daniel

    That's why I noted that it isn't very secure a number of times =) That's why I zauważyła, że nie jest bardzo bezpieczna ilość razy =)

  3. Juan Juan

    I appreciated this. I doceniał. It has been a while since I have had to build a project from scratch. Stwierdzono natomiast, ponieważ miałem do budowania projektu od zera. With this reference, I can now get on with development. Z tego odniesienia, mogę teraz dostać się z rozwojem. Later, I will absolutely want to lock down for my customer. Później będę absolutnie chcą zablokować dla mojego klienta. Then I hope to find another reference solution just as easily. Wtedy mam nadzieję znaleźć inne rozwiązanie odniesienie równie dobrze.

    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. Właściwie realizacji uwierzytelnianie oparte na IP nie może być najlepszą odpowiedzią na mnie ze względu na środowisko będę mieć, ale będę to przeprowadzenie. Simple is the essence of effectiveness for me. Proste jest istotą skuteczności dla mnie.

    And I do not plan on giving out the root password. I nie planujemy umożliwienie się hasło roota. Isn't that a measure of security? Czy nie jest to środek bezpieczeństwa?


Leave a Comment Zostaw komentarz




Leave your Zostaw swój friendly przyjazny comment here. komentarz.

If you have a computer help question, Jeśli masz pytanie pomocy komputera, click here to leave it on the forums Kliknij tutaj, aby pozostawić ją na forum instead. zamiast.

Note: Your comment may not show up immediately on the site. Uwaga: Twój komentarz nie pojawi się od razu na stronie.

Our Friends Nasi Przyjaciele
Getting Started Pierwsze kroki


About How-To Geek O How-To Geek
What Is That Process? Co to jest proces?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe Gadu-Gadu
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.