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.
1064 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 install the latest stable MariaDB version on CentOS 8?

    If you have a CentOS 8 server you might have noticed that installing MariaDB directly with the sudo dnf install mariadb-server command does not install the latest stable MariaDB version. Here’s how you could install t...
    Accepted Answer: Before getting started, make sure to follow our Initial Server Setup Guide for CentOS 8 guide: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-8 Also, make sure that you have wget ins...
    1 By bobbyiliev MariaDB MySQL Databases CentOS CentOS 8 Linux Basics Linux Commands
  • 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

    [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...
    1 By akshaykoshti401 Django Apache Ubuntu 20.04 MySQL Python
  • Question

    What's the easiest way to setup automatic nightly SQL script executions?

    Hi there, I was wondering how I could most easily setup nightly SQL script executions using the RDBMS here. I'm hoping to build a MySQL or Microsoft SQL Server database (as I learned how to use these in college) here ...
    Accepted Answer: Hi @nirox, My suggestion would be for you to use cron jobs. The cron jobs should be executed at night whenever you want and they should be scripts. In these scripts, you can specify what database queries to be done. I...
    1 By niroxu MySQL SQL
  • 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

    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

    trying to install mysql but I cannot start the service and cannot locate mysqld.sock

    I'm trying to install mysql but I cannot start the service and cannot locate mysqld.sock I am following the how to here: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-sta...
    Accepted Answer: Hi there @dezshredder, To me it looks like that your MySQL service is stuck in a crash loop as the status output that you've shared indicates that the status is: "Server startup in progress" and the uptime is 15 secon...
    3 By dezshredder Ubuntu MySQL Ubuntu 18.04 Databases
  • 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
  • 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

    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

    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

    How to use VPC to improve MySQL database security?

    I just watched the Digital Ocean webinar on VPCs on youTube (https://youtu.be/nbo5HrmZjXo). I found it really interesting and I was wondering how to use this to improve security on a system I maintain for a local soci...
    Accepted Answer: Hi there @jonVonBallstein, I think that a VPC would drastically improve your security if your webserver was also part of the same VPC so that way people would hit the webserver only and then the webserver would connec...
    1 By jonVonBallstein MySQL Java
  • Question

    "Cannot log in to the MySQL server" without code using phpMyAdmin on CentOS7

    I've set up a new CentOS 7 server with Apache, MySQL and phpMyAdmin using Digital Ocean's guides. However, when I try to log in to phpMyAdmin via the browser, I get the message "Cannot log in to the MySQL server" with...
    Accepted Answer: Assuming MySQL 8. ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD'; Reason: Some applications are having trouble with <^>caching _sha2 _password<^> method. Above sets the credentials to use the...
    4 By NielsKersic MySQL Databases CentOS
  • Question

    Port 3306 blocked even though do, ufw, and iptables are configured to allow.

    I am trying to remotely connect to my mysql instance and have been unsuccessful. ufw shows port 3306 open iptables is not configured and the droplet firewall shows that it should be allowed. I have confirmed that my i...
    Accepted Answer: Hi there @damianyates, It sounds like that your MySQL service might be binding only on 127.0.0.1:3306 and if you want to access MySQL from the outside world, you need to change this to 0.0.0.0:3306. To check if this i...
    2 By damianyates MySQL DigitalOcean Cloud Firewalls Firewall
  • Question

    Can't connect to MySQL instance in managed databases

    Managed MySQL instances were just released yesterday so I decided to spin one up to test it out. I have not been able to connect to the instance using any tool at my disposal. Running OSX 10.14.6 Sequel Pro (nightly b...
    Accepted Answer: <^>Answer:<^> Okay I think I've gotten to the bottom of this. I can't edit my original question but leaving this here in case someone else runs into it. The use of the non-standard port must have been blocked on my ne...
    6 By jhazel DigitalOcean MySQL
  • Question

    Phpmyadmin or Alternative for PHP7 + Nginx + MySql 5.7 + Ubuntu 16.04

    Hello, I have been reading up on the tutorials and some of the comments on the community pages but I would like to know if there are any better alternatives or any advice to better manage my databases. I use Phpmyadmi...
    Accepted Answer: Phpmyadmin does support PHP 7 and Mysql 5.7. I recommend you to grab latest release from their download page (https://www.phpmyadmin.net/downloads/). Current download link is: https://files.phpmyadmin.net/phpMyAdmin/4...
    2 By Lilap Nginx MySQL PHP Ubuntu 16.04