Subscribe to How-To Geek Підписатись на How-To Geek

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: Дайте суперкористувача вхід дозволу будь-якого хоста

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. Зауважимо, що це не дуже безпечно, і повинен бути використаний тільки для розвитку місцевого поле, де ви не відчуваєте, як створення окремого дозволу, але ще потрібно поєднати з іншими машинами.

To configure this feature, you'll need to update the mysql user table to allow access from any remote host, using the % wildcard. Щоб налаштувати цю функцію, Вам необхідно оновити MySQL Table дозволяє користувачеві доступ з будь-якого віддаленого комп'ютера, використовуючи підстановки%.

Open the command-line mysql client on the server using the root account. Відкрийте командний рядок MySQL клієнта на сервер за допомогою облікового запису \.

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: Потім вам потрібно буде виконати наступні дві команди, щоб дізнатися, що приймаюча кореневого користувача вже встановлено:

use mysql; використовувати MySQL;
select host, user from user; Вибір хоста, користувача від користувачів;

Here's an example of the output on my database, which is pretty much the default settings. Ось приклад виведення на мою базу даних, яка в значній мірі за замовчуванням. Note that ubuntuserv is the hostname of my server. Зверніть увагу, що ubuntuserv це моє ім'я хоста сервера.

mysql> use mysql; MySQL> Використання MySQL;
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 host,user from user; > ЗЕЬЕСТ хоста, користувача від користувачів;
+—————+——————+ +-----+------+
| 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 рядків (0.00 сек)

Now I'll update the ubuntuserv host to use the wildcard, and then issue the command to reload the privilege tables. Тепер я оновити ubuntuserv приймаючої використовувати шаблонні, а потім видати команду для перезавантаження таблиць привілеїв. If you are running this command, substitute the hostname of your box for ubuntuserv. Якщо ви працюєте в цій команді, замінити ім'я хоста вашого вікна ubuntuserv.

update user set host='%' where user='root' and host='ubuntuserv'; оновлена приймаючої безліч користувачів = '%', де користувач = 'корінь' і приймають = 'ubuntuserv';
flush privileges; Флеш привілеїв;

That's all there is to it. От і все, що потрібно зробити. Now I was able to connect to that server from any other machine on my network, using the root account. Тепер я зміг підключитися до цього сервера з будь-якої іншої машини в мережі за допомогою облікового запису \.

Again, note this isn't very secure, and you should at least make sure that you've Знову ж таки, до уваги це не дуже безпечно, і ви повинні принаймні переконатися, що ви set a root password встановити пароль root'а . .

This article was originally written on 02/9/07 Tagged with: Ця стаття була спочатку написана на 02/9/07 тегами: Database База даних , , MySQL MySQL , , Programming Програмування

Daily Email Updates Email Щоденні оновлення

You can get our how-to articles in your inbox each day for free. Ви можете отримати наші довідкові статті у Вашу поштову скриньку щодня безкоштовно. Just enter your name and email below: Просто введіть ваші ім'я та адресу електронної пошти нижче:


Name: Ім'я:
Email: Електронна пошта:

Comments (3) Коментарі (3)

  1. daniel Daniel

    I'm not exactly sure *why* you would want to do this. Я точно не знаю, чому * * Ви хотіли б це зробити. IP based authentication is an extremely useful security feature, disabling it – especially for the root user – is probably a bad idea. Вказівки щодо справжності на основі IP є надзвичайно корисна функція безпеки, відключити його, - особливо для суперкористувача - це погана ідея.

    That said, there really isn't anything wrong with allowing a limited user account access from every IP. Тим не менше, там дійсно немає нічого поганого в дозволяє обмежений доступ до рахунку користувача з кожної ІС. :-)

  2. The Geek Грайте та вигравайте

    daniel, Данило,

    That's why I noted that it isn't very secure a number of times =) Ось чому я відзначив, що це не дуже безпечно кілька разів =)

  3. Juan Хуан

    I appreciated this. Я оцінив це. It has been a while since I have had to build a project from scratch. Це був той час, оскільки я була будувати проект з нуля. With this reference, I can now get on with development. З цього посилання, тепер я можу отримати з розвитку. Later, I will absolutely want to lock down for my customer. Пізніше я буду абсолютно хочете заблокувати для моїх клієнтів. Then I hope to find another reference solution just as easily. Тоді я сподіваюся знайти іншу посилання рішення так само легко.

    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. Насправді здійснення перевірки автентичності на основі IP не може бути найкращою відповіддю для мене через навколишнє середовище я буду, але я буду її розслідуванні. Simple is the essence of effectiveness for me. Проста сутність ефективності для мене.

    And I do not plan on giving out the root password. І я не збираюся на видачу пароля. Isn't that a measure of security? Хіба це не засіб безпеки?


Our Friends Наші друзі
Getting Started Приступаючи до роботи


About How-To Geek Про How-To Geek
What Is That 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. Всі права захищені.