Perbedaan

Ini menunjukkan perbedaan antara versi yang terpilih dengan versi yang sedang aktif.

Tautan ke tampilan pembanding ini

Revisi selanjutnya
Revisi sebelumnya
linux:MariaDB.Tidak.Bisa.Login.Via.PhpMyAdmin [2017/03/25 08:32]
Samsul Maarif dibuat
linux:MariaDB.Tidak.Bisa.Login.Via.PhpMyAdmin [2020/12/14 20:13] (sekarang)
Baris 1: Baris 1:
-====== MariaDB Tidak Bisa Login vi phpMyAdmin ======+====== MariaDB Tidak Bisa Login via phpMyAdmin ======
  
 Jadi, saya menginstall %%MariaDB%% Server (pengganti %%MySQL%%) di raspberry pi saya dengan perintah :  Jadi, saya menginstall %%MariaDB%% Server (pengganti %%MySQL%%) di raspberry pi saya dengan perintah : 
Baris 5: Baris 5:
     sudo apt install mariadb-server     sudo apt install mariadb-server
  
 +Problemnya adalah, ketika login melalui terminal : **berhasil**,​ sedangkan saat login dengan %%phpMyAdmin%% : **gagal**((muncul pesan error : //​Connection for controluser as defined in your configuration failed.//))
 +
 +<​code>​
 +root@pi~# mysql -u root -p
 +Enter password: ​
 +Welcome to the MariaDB monitor. ​ Commands end with ; or \g.
 +Your MariaDB connection id is 78
 +Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
 +
 +Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
 +
 +Type '​help;'​ or '​\h'​ for help. Type '​\c'​ to clear the current input statement.
 +
 +MariaDB [(none)]>​ status
 +--------------
 +mysql  Ver 15.1 Distrib 10.0.29-MariaDB,​ for debian-linux-gnueabihf (armv7l) using readline 5.2
 +
 +Connection id: 78
 +Current database:
 +Current user:​ root@localhost
 +SSL: Not in use
 +Current pager:​ stdout
 +Using outfile:​ ''​
 +Using delimiter:​ ;​
 +Server:​ MariaDB
 +Server version:​ 10.0.29-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
 +Protocol version: 10
 +Connection:​ Localhost via UNIX socket
 +Server characterset:​ utf8mb4
 +Db     ​characterset:​ utf8mb4
 +Client characterset:​ utf8mb4
 +Conn.  characterset:​ utf8mb4
 +UNIX socket:​ /​var/​run/​mysqld/​mysqld.sock
 +Uptime:​ 45 min 40 sec
 +
 +Threads: 1  Questions: 1793  Slow queries: 0  Opens: 249  Flush tables: 1  Open tables: 112  Queries per second avg: 0.654
 +--------------
 +
 +MariaDB [(none)]>​
 +</​code>​
 +
 +**show grants** menunjukkan hasil sebagaimana berikut :
 +
 +<​code>​
 +MariaDB [mysql]> show grants;
 ++------------------------------------------------------------------------------------------------+
 +| Grants for root@localhost ​                                                                     |
 ++------------------------------------------------------------------------------------------------+
 +| GRANT ALL PRIVILEGES ON *.* TO '​root'​@'​localhost'​ IDENTIFIED VIA unix_socket WITH GRANT OPTION |
 +| GRANT PROXY ON ''​@'​%'​ TO '​root'​@'​localhost'​ WITH GRANT OPTION ​                                 |
 ++------------------------------------------------------------------------------------------------+
 +2 rows in set (0.00 sec)
 +
 +MariaDB [mysql]>
 +</​code>​
 +
 +Jadi, user **root** hanya dapat login via **unix_socket**. Solusinya, buat user baru saja dengan hak akses sama dengan user **root** tadi. LOL
 +
 +<​code>​
 +MariaDB [(none)]>​ create user samsul;
 +Query OK, 0 rows affected (0.00 sec)
 +</​code>​
 +
 +Buat passwordnya juga,
 +
 +<​code>​
 +MariaDB [(none)]>​ GRANT ALL PRIVILEGES ON *.* TO '​samsul'​@'​%'​ IDENTIFIED BY '​passwordku'​ WITH GRANT OPTION;
 +Query OK, 0 rows affected (0.00 sec)
 +
 +MariaDB [(none)]>​ FLUSH PRIVILEGES;
 +Query OK, 0 rows affected (0.00 sec)
 +</​code>​
 +
 +Keluar, ​
 +
 +<​code>​
 +MariaDB [(none)]>​ \q
 +Bye
 +</​code>​
 +
 +lalu login dengan user baru tersebut.
 +
 +<​code>​
 +root@pi:/​usr/​share/​phpmyadmin#​ mysql -u samsul -p
 +Enter password: ​
 +Welcome to the MariaDB monitor. ​ Commands end with ; or \g.
 +Your MariaDB connection id is 78
 +Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
 +
 +Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
 +
 +Type '​help;'​ or '​\h'​ for help. Type '​\c'​ to clear the current input statement.
 +
 +MariaDB [(none)]>​
 +</​code>​
 +
 +Lihat hasil perintah **show grants** sekarang :
 +
 +<​code>​
 +MariaDB [(none)]>​ show grants;
 ++------------------------------------------------------------------------------------------------------------------------------------------+
 +| Grants for samsul@localhost ​                                                                                                             |
 ++------------------------------------------------------------------------------------------------------------------------------------------+
 +| GRANT ALL PRIVILEGES ON *.* TO '​samsul'​@'​localhost'​ IDENTIFIED BY PASSWORD '​*FA00FAEAD806130240147CF33C5591D78Cxxxxxx'​ WITH GRANT OPTION |
 ++------------------------------------------------------------------------------------------------------------------------------------------+
 +1 row in set (0.00 sec)
 +
 +MariaDB [(none)]>​ \q
 +Bye
 +</​code>​
 +
 +User tersebut tidak terikat dengan **unix_socket**. Sekarang coba login dengan http://​ip-server/​phpMyAdmin,​ dan **berhasil**.
  
  
Baris 15: Baris 127:
   * http://​www.linuxquestions.org/​questions/​fedora-35/​unable-to-connect-o-mysql-using-php-via-web-browser-4175497994/​   * http://​www.linuxquestions.org/​questions/​fedora-35/​unable-to-connect-o-mysql-using-php-via-web-browser-4175497994/​
   * http://​askubuntu.com/​questions/​756181/​installing-php-5-6-on-xenial-16-04   * http://​askubuntu.com/​questions/​756181/​installing-php-5-6-on-xenial-16-04
 +
 +~~DISQUS~~
  • linux/MariaDB.Tidak.Bisa.Login.Via.PhpMyAdmin.1490430777
  • Terakhir diubah: 12 bulan yang lalu
  • (Perubahan eksternal)