Questions tagged as ['mysql']
I am trying to install phpMyAdmin and it complained about not able to connect to MySQL server. It seems that the relevant services are not started but I cannot start it.
Here is the results of some commands I run.
# mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
# service mysql stop
# service mysql start
Failed to start mysql.service: ...
I have a bash shell to back up a database that requires a password to open it. I want to run on a cron job, but how do I make it run automatically without filling in the database password?
ubuntu server version : 20.04.3 Mysql version : 8.0.26
The command i tried : mysqldump -u root -p "dbname" > backupname.sql
when I press enter, the system asks for password. when i remove -p
, error occurs.
My mechine borked down. Only thing i have is the files of mysql in /var/lib/mysql
Is there a way to import it to new mechien without problems?
Upon cleaning up my filesystem and uninstalling services I don't use, I noticed that 'htop' shows what appears to be a MySQL daemon running at
/usr/sbin/mysqld
The thing is I don't have any MySQL installed manually, and I purposely removed MySQL / Maria installations. When I look at the location:
/usr/sbin/mysqld
It doesn't even exist on the filesystem. Systemctl status queries return nothing for 'mysql' ...
I'm running an Ubuntu 20.4 server and I've recently removed mysql-server and mysql-client and am trying to get MariaDB up and running. I've installed both mariadb-server and mariadb-client. I stop and then try to restart maria db. I get the general error message:
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl ...
I am trying to set up MariaDB server under xubuntu 20.04 and import all the db's I had previously on another machine under xubuntu 18 (following the notes I took when doing it there coming from opensuse).
The installed mariadb has datadir in /var/lib/mysql
, and contains only a "null" msyql db with a root user with no password (as tested entering as sudo mysql -u root mysql
which requires my personal ...
When I try installing MySQL server I get this error. "E: Unable to correct problems, you have held broken packages."
$ sudo apt install mysql-server
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some ...
After running sudo apt autoremove
in order to remove packages they are no longer needed I'm getting the following messages:
EDIT
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
apg colord-data gnome-control-center-faces gnome-online-accounts libcolord-gtk1 libcolorhug2 libgsound0 libgssdp-1.2-0 libgupnp-1.2-0
libg ...
I am working on a fresh install of Ubuntu 21.04 or a Dell R610 server.
I recently installed mariadb and a number of Wordpress sites. I had to remove, purge and autoremove the mariadb because of the error I will present here. At this point I am starting fresh install of mysql-server.
I did the following steps to install mysql-server
{lsb-release -a}
No LSB modules are available.
Distributor ID: U ...
Hi Im running the following mysql query using a bash script:
#!/bin/bash
set -f # disable globbing
IFS=$'\n' # set field separator to NL (only)
arr=($(sudo mysql -u root -h localhost -e "USE mydb;SELECT * FROM sites" | awk 'NR>1'))
echo $arr
which is returning the following:
1 Jhon Richards jhonrichards@gmail.com
Then I'm trying to get just the firstname (Jhon) and st ...
I am able to start my port and it is listening but the webpage localhost:3001 does not load. I did just get a new laptop ND Hve installed node and mysql... is there something else that i am missing? i do have my path set to both files.
I'm trying to install MySQL using:
sudo apt install mysql-server
and I'm getting the following message at the end of the process:
E: Sub-process /usr/bin/dpkg returned an error code (1)
The whole input/output:
ubuntu@ubuntu:~$ sudo apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically in ...
I am using Ubuntu to configure Wordpress on WSL. Currently, I am trying to install MySQL as part of the LAMP Stack using the following as per this tutorial:
sudo usermod -d /var/lib/mysql/ mysql
sudo service mysql start
When I run the second command, I see "fail" in red appear (ie. mysql won't start). Here is what the Error Log looks like:
2021-09-05T08:17:59.936284Z mysqld_safe Logging to '/var/log ...
I am having a hard time running mysql on ubuntu 21.04. I tried:
sudo apt remove --purge mysql-server
sudo apt purge mysql-server
sudo apt autoremove
sudo apt autoclean
and
sudo systemctl stop mysql
sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql
sudo apt autoremove
sudo apt autoclean
before reinstallin ...
immediately I installed mysqljs/mysql my IP address started throwing the error:
502 Bad Gateway
nginx/1.18.0 (Ubuntu)
and even after I uninstalled it my IP is still having the same error. I then tried to re-install it as root, then it threw the error:
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects clone ssh://git@github.com/mysqljs/mysql.git /ro ...
I started getting this error when I installed mysql_server on my server as root, I am using ufw, I don't know if I am supposed to allow mysql server through my ufw if I am supposed to, I don't know how, also on my local server I'm getting this error:
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'mysql'
at Function.Module._resolveFilename (internal/modules/c ...
I've setup a new 20.04.03 LTS Server. I can connect to MySQL locally, but can't connect from workbench on remote machine.
I've created my user username@% and granted all permissions.
I went an edited sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
and added bind_address = 0.0.0.0
The line was not already in there.
I've logged into mysql on the localhost and checked
mysql> show variables like "%bin ...
Is it possible to install mysql 5.7 on ubuntu 21.04?
I have tried this : https://computingforgeeks.com/how-to-install-mysql-on-ubuntu-focal/
But it doesn't seem to work.
Start-Date: 2021-09-01 20:39:05
Commandline: apt purge mysql-server
Requested-By: user (1000)
Purge: mysql-server:amd64 (8.0.26-0ubuntu0.20.04.2)
End-Date: 2021-09-01 20:39:07
Start-Date: 2021-09-01 20:39:27
Commandline: apt autoremove
Requested-By: user (1000)
Remove: mecab-utils:amd64 (0.996-10build1), libevent-core-2.1-7:amd64 (2.1.11-stable-1), mysql-server-8.0:amd64 (8.0.26-0ubuntu0.20.04.2), lib ...
I recently upgraded a server from Ubuntu 18.04 to 20.04. After that, I keep getting a warning from bacula-daemon:
31-aoû 05:02 bacula-dir JobId 0: Warning: Dbdriver field within director config file "dbi:mysql" mismatched with the Database argument "MySQL" passed during Bacula compilation.
If mysql
is not appropriate for MySQL
, then what is appropriate? What should I use?
I was trying to run a long running task that update a database and database size is around 2GB and total server disk size is 25GB.
So now we are seeing that server is full. When run df -h
in /var/lib/mysql#
here is the result I get:
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 394M 41M 354M 11% /run
/dev/vda1 25G 25G 0 100% /
...
Im setting up a new server on Ubuntu 20.04, and installed the LAMP apps. apache2 works fine and is accessing the PHP modules fine with the exception of getting the MySQLi database connection working. If I do: php -m
It does say that mysqli is loaded and there, but when restoring my joomla backup it can't get past the point of connecting to the database.
Any help?
I would like to know is it possible to login into MySQL or PHPMyadmin with the same login mechanism like SSH key login?
The mechanism behind SSH key login was digital signature with challenge and respond. Is it possible to just put public key into MySQL/Phpmyadmin just like SSH so that the authentication can rely on public key authentication and cryptography randomness instead of relying on probl ...
I've made an upgrade form 16.04 to 18.04.1 without apparently any problem (hosted on a 1&1 dedicated server) This server is running different Joomla! based sites Had to restart MySQL server and then no more any response form MySQL server
Have tried re-installation with :
sudo apt-get remove mysql-server
sudo apt-get install mysql-server
Without any luck (ie none of our sites are running now) Tried to ...
This is what Im trying now
In PHP Im running the following sript:
exec('/home/user1/createinstanceinfolder.sh', $output, $return_var);
print_r($output);
Which is calling the following Bash script:
declare -A arr == $(sudo mysql -u root -h localhost -e "USE mydb;SELECT * FROM users")
for i in "${arr[@]}"
do
echo "$i"
done
Php is printing a empty array, what is wrong here?
I can convert data database to .csv
using sqlcmd
syntax on my ubuntu
sqlcmd -S ipdb -U sa -P "passwordsa" -d dbname -Q "select * from tabelname" -o "direktori/file.csv" -s"," -W -w 700
but how can I insert data from my .csv
to table using sqlcmd
syntax?

Just as the title said. I tried to upgrade to MySQL 8 on my Ubuntu 18.04 box. I downloaded mysql-apt-config_0.8.12-1.all.deb
,updated and then tried to upgrade. The following is the outcome from my terminal:
faiz@faiz ~ > sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
dpkg: error: dpkg frontend is locked by another process
faiz@faiz ~ > sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
Selecting previ ...

I am using Ubuntu 20.04 under VirtualBox with Windows 10 as the host. The problem I had has occurred to me twice within 3 days.
I am doing Drupal development work with a fairly large database which I had to occasionally reload. My disk usage is at 75% but later on I see it climbing to as high as 90%. I try to clean up as much as I can but disk usage is still climbing. Over time, Apache and MySQ ...
While trying to fix mySQL I seem to have made a huge mistake running sudo chmod -R 777 / var/lib/mysql which seemed to have change everything to green folder instead of purple and now even files like sudo won't work.
I am logged onto SSH as a root user. How do I become the "owner" and able to access all the files again?
I've been able to use Sqoop/Flume import command perfectly on Ubuntu terminal. But right now, I'm trying to do so on Jupyter notebook.
How can I import from MySQL to HDFS using Sqoop import command and Log files from twitter using Flume on Jupyter notebook?