MySQL

MySQL is a prominent open-source relational database management system. An incredibly flexible and powerful program, MySQL is used to store and retrieve data for a wide variety of popular applications.

MySQL subscription active
You will receive email notifications for new publications on MySQL.
1172 Results
  • Question

    Completely uninstall mysql-server

    Hi there, first of all I need to make some history to tell why am getting to this point. A few days ago, making a multisite WordPress installation I lost access to database. This I solved it without breaking my head. ...
    Accepted Answer: Hi there @themingisprose, Indeed deleting files directly from your MySQL folder is really not recommended. You can take a look at this guide here on how to delete old MySQL binary files here (https://bobbyiliev.com/bl...
    1 By themingisprose MySQL Ubuntu 20.04
  • Question

    How to change caching_sha2_password to mysql_native_password on a DigitalOcean's Managed MySQL Database?

    I want to use the new DigitalOcean MySQL Managed Databases with my PHP application but I'm getting this error here: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; con...
    Accepted Answer: Hello, The easiest way to fix that would be to alter your existing user with the following: ALTER USER <^>myuser <^>IDENTIFIED WITH mysql_native_password BY '<^>mypassword<^>'; Another thing that you could do is to ...
    6 By bitmap Databases MySQL PHP WordPress
  • Question

    Access denied for user 'test'@'localhost' (using password: NO)

    My login attempts fail for a new user account that I have created, and I have spent several hours learning how authentication is handled by MySQL, with no progress. Everything is on the same server: - MySQL 5.7 - phpM...
    Accepted Answer: Hello, I think that you have a typo in your grant privileges query. I've tried your queries and it worked as normal, I just had to adjust the grant privileges query a little bit. Here's what I did: I created a databas...
    2 By CommunityUser1121 MySQL LAMP Stack
  • Question

    MySQL service unable to start...

    Hi, I'm getting an "Error establishing a database connection" in WordPress, and on further inspection it looks like the MySQL service isnt running. When I try and run sudo service mysql start, I get: Job for mysql.s...
    Accepted Answer: Embarrassingly, I just realised that the issue here was my backup plugin had piled up loads of backups rather than deleting the old ones... So the droplet had run out of disk space which was causing the issues. So I'v...
    7 By tom372644c64647f2622360702 MySQL Debian
  • Question

    How to link my discord bot (.py) to my managed MySQL database. (Ubuntu 20.04)

    I was following this tutorial (https://www.digitalocean.com/community/tutorials/how-to-connect-to-managed-database-ubuntu-18-04#connecting-to-a-managed-mysql-database) and despite this when I start my bot it gives me ...
    Accepted Answer: Hi there, As far as I can see from the error you have not specified the correct Managed Database port and your python application is trying to connect on the default one: Can't connect to MySQL server on 'discordbotd...
    1 By giuseppeletplay Python MySQL
  • Question

    #2002 - No such file or directory &mdash; The server is not responding (or the local server's socket is not correctly configured).

    When I try to login my PHPMyAdmin, I get the following error messages: ``` 2002 - No such file or directory &mdash; The server is not responding (or the local server's socket is not correctly configured). mysqlirealc...
    Accepted Answer: Hello, I would recommend changeinglocalhost to 127.0.0.1 in your config.inc.php PHPmyAdmin file. It should look something like this after the change: $cfg['Servers'][$i]['host'] = '127.0.0.1'; That way when using 12...
    2 By bepari662 MySQL PHP Apache Ubuntu 18.04
  • Question

    Can't login to mysql as root user even though I have the password

    I followed this tutorial on how to set up phpMyAdmin on Ubuntu 18.04: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-18-04 In step 2 I'm trying to log in to mysql using...
    Accepted Answer: Hi there @maxRay, It looks like that the MySQL password that you are trying to use is not correct. In case that you've lost the MySQL root password I could suggest following the steps from this tutorial here on how to...
    2 By maxRay MySQL Ubuntu 18.04
  • Question

    Assistance with MySQL my.cnf file preventing mysql from starting

    I recently upgraded to Ubuntu 20.04 and mysql8. I have a my.cnf file located in /etc/mysql/. which, upon first installation of the mysql 8 ignores that file (because it's listed as world writeable) and runs msyql ...
    Accepted Answer: Hi there @davidboudia, Note that the /etc/mysql/my.cnf file is not really a file but a symlink (https://www.digitalocean.com/community/tutorials/workflow-symbolic-links). It basally is a 'short cut' to the /etc/altern...
    1 By davidboudia MySQL Ubuntu 20.04
  • Question

    How can I kill all MySQL sleeping queries?

    Hello, I've noticed that I have a lot of sleeping MySQL processes. I tried killing them one by one but there are too many to do so. Does anyone know if there is an easier way to kill all sleeping processes at once? Th...
    Accepted Answer: Hello, Yes, you can kill all of your sleeping connections with this command: for i in `mysql -e "show processlist" | awk '/Sleep/ {print $1}'` ; do mysql -e "KILL $i;"; done However, this is not a permanent solution...
    2 By bitmap MySQL Linux Basics
  • Question

    Unable to connect to mysql docker container from within digitalocean droplet

    I have an mysql container (incl. adminer) running on a droplet, I can access the container from my local pc or anywhere on the net using the public ip inside my dotnetcore api container however when i run same contain...
    Accepted Answer: Hi there, What I usually do is to create a Docker network and attached the containers to the same network. Then you could use the name of the MySQL container for your connection string. Here is how you could do that: ...
    1 By vumanimdabe Docker MySQL
  • Question

    MySQL Service is not responding

    A few days ago I notice that mysql service is not working, I have tried to restart it, but nothing, it sends an error like: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysq...
    Accepted Answer: Hi there, Indeed if your disk space gets to 100% it is quite possible that MySQL would crash and won't start after that. I could suggest clearing some old logs from the /var/log directory. Just so you could have a lit...
    2 By themingisprose MySQL Ubuntu 20.04
  • Question

    phpmyadmin suddently gives http error 500

    Hi, I have 3 Droplets all with ubuntu 18.04, Php 7.2.24, phpmyadmin ver. 4.6.6. Until yesterday phpmyadmin worked fine, but now it gives me HTTP Error 500. Otherwise there is nothing wrong with the servers - (not th...
    Accepted Answer: SOLVED!! After many hours i finally found what was wrong. In /etc/phpmyadmin/config.inc.php last line there was a ";" missing $cfg['TempDir'] = '/usr/share/phpmyadmin/tmp'; <-- ;
    5 By kenboye MySQL Ubuntu 18.04
  • Question

    How to separate MySQL Server from LAMP

    i wanna have a server for php + apache2 and another server for MySQL. i installed everything in each server but how can the 2 servers communicate what should i do to let my web app in the apache server communicate wit...
    Accepted Answer: Hi there, You will first need to allow remote connections for your MySQL server. You can do that by following the steps here: https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql After ...
    1 By IhebZanina LAMP Stack Apache PHP MySQL
  • Question

    How to install manually phpMyAdmin on Ubuntu?

    It is usually recommended to use distribution packages when possible - they usually provide integration to your distribution and you will automatically get security updates from your distribution. You can find a coll...
    Accepted Answer: There are a few ways of installing phpMyAdmin as described in the official documentation here: https://docs.phpmyadmin.net/en/latest/setup.html However I've been using another method which is a bit more convenient for...
    1 By bobbyiliev MySQL PHP LAMP Stack Apache
  • Question

    Why can't I connect to a remote MySQL server from a PHP application, but can connect from mysql-client

    Hi! I'm bamboozled. Here's the setup: * One application server, Ubuntu 18.04 LTS (PHP 7.2, mysql-client) * One database server, Ubuntu 18.04 LTS (mysql-server 5.7) I need to connect to the database from a PHP appl...
    Accepted Answer: Hello, This is quite interesting. As you are able to connect to the database with the mysql command, my guess would be that the password that you are using might not be correct, does your password have any special cha...
    1 By firestormbe352da97c3f50bea MySQL PHP Ubuntu 18.04
  • Question

    Managed mysql database for small app

    Hello, we have a small application running on a droplet and this application receives an average of 160 requests / minutes and performs some CRUD operations on the database. In each request, a connection is opened wit...
    Accepted Answer: Hi there, I believe that 160 requests per minute should be OK, this is a little bit less than 3 queries per second. However, it really depends on the complexity of the queries and the amount of data. If you are doing ...
    1 By csalg12 DigitalOcean Managed MySQL Database MySQL Databases
  • Question

    MySQL Managed Database can't modify database without setting primary key, but I can't set primary key without modifying the database.

    Hi, so I currently have a table with the following datatypes: column1 -> TEXT column2 -> TEXT column3 -> TEXT This table is huge, with over 500k+ rows. When I initially started using MySQL on DO, I hardly knew what a ...
    Accepted Answer: Hi @miramallows You can use the SET SESSION sqlrequireprimary_key = 0; It is for a single session though. Once you log out, you would need to run this again before you could do modify the table without primary key. T...
    1 By miramallows DigitalOcean Managed MySQL Database MySQL SQL
  • Question

    [Errno 13] Permission denied: '/var/www/mysite2/media/' after deployment.

    Hi, I have hosted my website according to your website guidance. And my website is working after hosting but when I try to access my media directory, I get this [Errno 13] Permission denied: /var/www/mysite2/media/ I ...
    Accepted Answer: Hi there @akshaykoshti401, I would recommend starting with checking your Nginx error log: command,bash sudo tail -100 /var/log/nginx/error.log It is possible that the Nginx user does not have read permissions for the...
    2 By akshaykoshti401 Django Apache Ubuntu 20.04 MySQL Python
  • Question

    Has anyone solved this error?A PHP Error was encountered Severity: Warning Msg: mysqli:real_connect(): (HY000/2002): Connection refused

    error 1 A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (HY000/2002): Connection refused Filename: mysqli/mysqli_driver.php Line Number: 201 error 2 A PHP Error was encountered Severity:...
    Accepted Answer: Hello, It looks like that your server is running out of disk space. You can check that with this command: df -h My guess would be that the server ran out of space and MySQL crashed, that is why you are getting the f...
    1 By thiago20 MySQL PHP Ubuntu
  • Question

    Reseting WordPress admin password via the command line (terminal)

    I've seen this question a lot where people have forgotten their WordPress admin password and they don't remember their email in order to use the "Lost Password" feature. The password can be changed/reset from MySQL/Ma...
    Accepted Answer: First you need to identify the table responsible for storing WordPress user accounts. Usually the table that stores all user information is <^>wp_users<^> but you may have different database prefix so you can check yo...
    3 By alexdo WordPress MySQL MariaDB