A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
Write for DigitalOcean
You get paid, we donate to tech non-profits.
Find and meet other developers in your city.
Contribute to Open Source
My sql server has gone away, in connector.php line 67
Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below.
What is your question?
Where can I find the connector.php?
I don’t know, it’s your code?
Sorry) That’s file https://github.com/illuminate/database/blob/master/Connectors/Connector.php#L68
And in that string I have a problem)
You can type !ref in this text area to quickly search our full set of tutorials, documentation &
marketplace offerings and insert the link!
I recently wrote a small web app in PHP that needs a database. So I chose MySQL with the idea that it would be efficient and not taking up any memory. My droplet has 1GB of RAM with 30GB of storage on Ubuntu 16.04. I started noticing the memory problem after I was getting warnings from APT trying to update my packages list (`FATAL -> Failed to fork`).
So then I ran `ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -2` to check what processes were using all the memory. Here is the output:
80.0 0.0 2611632 1236 /usr/sbin/mysqld
1.6 0.0 274288 1427 /usr/sbin/apache2 -k start
I can tell from here that MySQL is using 80% of the RAM on my droplet. Is there any way to make is more memory efficient so I don't have to upgrade to more RAM on my droplet?
I am pretty new to being a sysadmin so I don't know much about dealing with databases and such.
I'm trying to use a script, but I'm getting an error. Apparently the error is caused by not having "mysqli_connect" enabled. Could anybody offer any insight to correcting this? I tried using different versions of PHP with no fix.
I am using ServerPilot as well.
In the picture attached it shows total memory used is 41%
but in the bottom apache is using 81% of the memory , which one is correct ?
I have problem with remote connection to my MySQL database.
My changes in /etc/mysql/mysql.conf.d/mysqld.cnf
#bind-address = 127.0.0.1
I also run this lines in mysql:
mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
sudo service mysql restart
Unfortunelly I still cant' connect with my database. What is the problem?