Questions tagged [mysql]

An open-source, relational database management system.

14
votes
4answers
27k views

How to pass password to mysql command line

I have MySQL password saved on a file foo.php, for example P455w0rd, when I try to use it: $ cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2 | mysql -U root -p mydb -h friendserver Enter password: (...
4
votes
4answers
55k views

setting mysql root password in CentOS 7

How can I log into the mysql 5.6 command line client and reset the root password in Centos7? I read the following at this link, but it does not work: 1) sudo service mysqld stop 2) sudo service ...
12
votes
5answers
31k views

How to change MySQL 'root' password using MySQL v5.7?

Current Environment : mysql> show variables like "%version%"; +-------------------------+------------------------------+ | Variable_name | Value | +---------------...
13
votes
2answers
34k views

How can I completely reinstall mysql?

I had to reboot in the middle of a large data import. I only have one mysql database, which has now been corrupted. How can I completely remove mysql and reinstall it? I've tried apt-get purge mysql-...
11
votes
4answers
20k views

MySQL max_open_files more than 1024

While starting MariaDB I got [Warning] Could not increase number of max_open_files to more than 1024 (request: 4607) $ sudo systemctl status mysqld ● mysqld.service - MariaDB database server Loaded:...
5
votes
4answers
14k views

unable to launch mysqld in arch linux

I have recently installed Arch Linux x64 and I wanted to install the LAMP stack. Everything worked fine, until I arrived to the MySQL part that I installed but can't launch. The output of sudo ...
6
votes
2answers
28k views

df command not showing correct values

This is a RHEL server, I'm running a MySQL server on it, the database and log files (however, logging is disabled) are located on the /srv directory where plenty of space is available. Recently I had ...
1
vote
1answer
7k views

run multiple instances of MySQL CentOS7

I need to have multiple instances of MySQL running on my PC. I did this: yum install mariadb-server mariadb => install mysql mysql_install_db --datadir=/var/lib/mysql => use mysql_install_db ...
1
vote
3answers
6k views

How to create an interactive bash script to collect arguments for a command in linux?

I'm trying to create an interactive bash script where I can collect user input variables to be used as arguments in another command. Can someone provide me an example of this? Currently i want to do: ...
0
votes
2answers
6k views

Mysql queries from bash file

I'd like to run multiple MySQL queries and save them to specified files. Queries are saved in a bash script, queries.sh, e.g.: cat queries.sh mysql -u <user> -p <DBname> -e "select Col1 ...
-1
votes
5answers
4k views

Use a password in shell-script

I want to create a cron script to interact with mysql, for example #!/bin/bash mysql -uroot -p echo root echo "CREATE DATABASE example" But it doesn't work, it only prompts: Enter password: and ...
5
votes
6answers
4k views

Multiple ssh sessions in single command

I'm trying to copy a database from one server to another. I tried using the following command and it's getting tied up on entering the ssh passwords. If I put in one server's password, it complains ...
4
votes
3answers
13k views

MySQL not getting started on linux

I need to run MySQL service for my linux 2.16 version with SUSE version 11 distribution. Downloaded the following files and installed all the rpms as under: MySQL-server-5.5.27-1.sles11.i586 MySQL-...
3
votes
2answers
360 views

How can I monitor a file that fully recreates during its run?

This is a follow-up question of Why are some file changes not shown in tail -f? With the use of capital F: tail -F I can monitor the output of tail -F ~/.mysql_history from the manual: --retry ...
2
votes
1answer
463 views

Install MySQL in the Debian Jessie (8)

I'm new in Linux, freshly installed a Debian Jessie (8) OS and need to work with MySQL. The hostname is, hostname -f It prints, debian8 When I type in the terminal, sudo dpkg --get-selections ...
2
votes
3answers
2k views

Any work-around to pipe zip files? [duplicate]

I use Ubuntu 16.04 with Nginx and Bash. I know that it's not possible to directly pipe data into zip. For example, if you host websites on Apache/Nginx webserver, this command set would fail after ...
1
vote
1answer
86 views

Creating an autorized, all privileged user and an identically named DB via CLI (Bash) in one row

I frequently need to do the following things in MySQL: Create a non-root user Set that user's password Grant that user all privileges Make a database with the same name as the new user Allow usage ...
1
vote
3answers
705 views

mysql database no space available

I was restoring a 200 GB database into a newly installed RHEL machine. However, while restoring I ran into no space available issue. Is it possible to change the directory where the databases are ...
0
votes
1answer
662 views

Mysql: remote and local access

I have a gentoo where is installed a mysql server. I need a remote access to this server, so I have modified the option bind address in the file /etc/mysql/my.cnf bringing it from bindaddress: 127....
0
votes
1answer
1k views

limit of open files: Debian Jessies´ MySQL vs Community Oracle MySQL

I have just upgraded from MySQL Jessie 5.5 to MySQL Oracle Community Edition v5.6. I have a particular MySQL server, that has around 230 DBs, and > 32k files/tables. Whilst for two or three years, I ...
0
votes
1answer
613 views

Confused about using the Zabbix Template MySQL (800+ items)

Please explain the full use of this template.link template I searched very much on Google, I have configured as described but i can't use this yet. Can you fully explain? i have two centos 7. zabbix ...
7
votes
2answers
6k views

SSH tunnel via MySQL Workbench

my new production server is only visible via ssh double tunnel. I can reach targetHost over Ubuntu's 14.04 console simply executing command ssh targetHost and than executing mysql cli on remote ...
2
votes
2answers
735 views

Silent MySQL Server installation

I want to install a mysql-server on a Raspberry Pi (Debian) using a SSH-connection and a bash script, which contains the installation commands. The point is, that the installation needs to be done ...
6
votes
1answer
2k views

Linux : Alternative of install_name_tool of MAC in CentOS

I am looking for alternative of install_name_tool of MAC in CentOS. Exactly I want to build MySQL on non default location. Also the shared libraries of the mysql binary should be on non default ...
4
votes
4answers
2k views

~/.mysql_history size limit

My .mysql_history file size is limited to 300 lines. I would like to keep the mysql history unlimited. However, I couldn't find any way to do it (in man page, and in google) Can somebody please ...
11
votes
2answers
5k views

FreeBSD: “Too many open files” but should be able to open another 160,000 files

I have a FreeBSD 8 system running ZFS, with a MySQL 5.5 server which is about 355GB and projected to grow to be a couple of Terabytes. MySQL is triggering errors about "Too many open files" on /etc/...
6
votes
1answer
8k views

MySQL stop/waiting issues; “can't connect … through socket” [duplicate]

So this was my first time putting up a LAMP stack on a Bodhi machine (previously experience with WAMP, and LAMP on 10.04); I got Apache going, and a Drupal install begun, then I go to create a new ...
5
votes
2answers
5k views

Apt-get hangs on “Setting up mysql-server-5.5 (5.5.44-0+deb8u1)”

I'm on Debian 8 (stable) (Linux zenbook 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux) and tried to apt-get update && apt-get upgrade yesterday. There was an ...
5
votes
3answers
9k views

MySQL Workbench Cannot start SSH tunnel manager

I don't know why this error is happening when I try to connect by MySQL Workbench. Cannot start SSH tunnel manager. I'm using slackware 14.1 and installed all dependencies.    
4
votes
2answers
8k views

MySQL root account without password?

I've just installed MySQL server with no password on root account. I was prompted to enter root password 3 times and I left it blank all three times because I don't want to use password. But now it ...
3
votes
1answer
169 views

Why are some file changes not shown in tail -f?

I tried to follow the mysql history file with: tail -f ~/.mysql_history in another window I entered as the same user: mysql -u someotheruser -p and none of the following commands are shown in my ...
3
votes
3answers
8k views

After fresh install of mysql-server, can't log in with `mysql root -u`

EDIT: I believe this is actually a duplicate of https://askubuntu.com/questions/766334/cant-login-as-mysql-user-root-from-normal-user-account-in-ubuntu-16-04 I used the top answer from that page and ...
3
votes
2answers
4k views

Install mysql workbench community on fedora 23

The mysql-workbench-community package is available for Fedora 22 in the official repos, but unfortunately not yet for Fedora 23. Trying to install the fc22 version results in mysql-workbench not ...
3
votes
1answer
2k views

Establish connection between Qemu Raspbian machine and Host

Objective: I would like to install several virtual (emulated) Raspberry machines on the laptop, connect them to each other and to the laptop. Afterwards I would like to send tcp packets from virtual ...
2
votes
0answers
107 views

Unable to install Mysql

When I install mysql on my Centos, I get the following error: Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile Could not retrieve mirrorlist ...
2
votes
2answers
669 views

Is it secure to connect remotly to Mysql using shell?

I have created a shell script to connect to a DB and do some queries: #/!bin/bash ... ... mysql -h remote -u root --password='pw' MatchingDB some SQL queries My question is : Is this connection ...
2
votes
1answer
12k views

can not install mysql-server on centos 6.7 32bit . Error: need rpm?

when I try to install mysql-server on centos with this command: yum install mysql-server server replies: Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds ...
1
vote
1answer
2k views

Mysqld_multi doesn't recognize groups

I am trying to configure a MySQL server to run multiple instances of the daemon (I wish to duplicate it onto different drives). I've been trying to use the mysqld_multi script. However the script is ...
1
vote
1answer
46 views

Why is mysql server accepting nonlocal request, while postgresql server is not?

By default configurations, why is mysql server accepting nonlocal request, while postgresql server is not? $ nmap -p0-65535 192.168.1.97 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-20 14:34 ...
1
vote
0answers
7k views

mysqld dead but pid file exists

Webserver was running fine for weeks then suddenly: I can access, but I am unable to log into Webmin I can access Magento, a php-based storefront application, but I am no longer able to log in and it ...
1
vote
1answer
321 views

Mint 12 - Error updating MySQL (mysql-client-core-5.1)

I have MySQL 5.5 installed via packages.dotdeb.org. When trying to update 5.1, which is also installed, I get the following error: E: /var/cache/apt/archives/mysql-client-core-5.1_5.1.66-0ubuntu0....
1
vote
1answer
2k views

Mysql Isn't starting

I recently asked this question the reason mysql wasn't starting is because there was no disk space. After a long discussion with casey in chat room and after following his answer, I freed about 10 GB ...
1
vote
2answers
2k views

Running `sudo /sbin/service mysqld start` causes system to crash

OS: CentOS 5.10 Service: Amazon Web Services Attempted to remove MySQL 5.0 and install MySQL 5.6 I had a server set up, and was going to use MySQL, but it was was set up with MySQL 5.0. Since ...
0
votes
2answers
2k views

Autostarting a python script whenever it crashes

I am trying to autostart a python script everytime it crashes on my raspberry pi. I am adhering to the shell script solution offered here: https://raspberrypi.stackexchange.com/questions/14735/how-do-...
-2
votes
1answer
485 views

Best Linux for a small Web server [closed]

I'm currently planning my business servers and I would like to know what's the best Linux distro for these needs: Nginx + MySQL + PHP 5.4 Zimbra Collaboration - Open Source Node.js w/ Forever I know ...