An open-source, relational database management system.

learn more… | top users | synonyms

14
votes
2answers
808 views

Will my MySQL query continue to run even if my ssh connection drops?

I've connected to a server over SSH and logged in to mysql, and asked it to run a query (the results of which are dumped into a CSV) that could take well over an hour. Although I have instructed my ...
11
votes
2answers
2k 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 ...
9
votes
1answer
496 views

MySQL gets killed by OS every 25 days or so

About 4 months ago we migrated from MS SQL Server to MySQL 5.5. Since then we have been experiencing an issue once approximately ever 25 days since where CentOS runs out of memory and as a result it ...
7
votes
5answers
3k views

Fedora 16 strange /tmp permissions: mysqld will not start

I installed mysql on a brand-new Fedora 16 server and it would not start. This is the line from the log file (^G and all): ^G/usr/libexec/mysqld: Can't create/write to file '/tmp/ibNPyIlu' (Errcode: ...
6
votes
2answers
2k views

Get a progress indicator when importing MySQL databases

I often import MySQL databases, and this can take a while. There is no progress indicator whatsoever. Can one be shown, somehow? Either records imported, MB imported, or tables imported... anything is ...
6
votes
2answers
319 views

Back up mysql server

I want to backup all databases, users and etc on our mysql sever. I have come across the command mysqldump and believe I can use it like this? (Trying to backup a REMOTE server to our LOCAL machine) ...
6
votes
1answer
443 views

/etc/passwd sql with bash access

I just got a CentOS VPS and was reviewing the passwd file and saw this: mysql:x:498:499:MySQL server:/var/lib/mysql:/bin/bash Is bash necessary for mysql?
5
votes
5answers
884 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 ...
5
votes
3answers
4k views

Will yum remove mysql-server delete my databases?

My MySQL server has broken down, and I can't figure out why. Trying to do a yum reinstall I get this: Error: mysql-server conflicts with mysql-server I figure that's because the server already had ...
5
votes
1answer
12k 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 ...
5
votes
1answer
835 views

Batch importing .sql files

I have a bunch of .sql files in a directory that I need to import. Although I can do it manually, for scripting purposes I need to be able to apply them in bulk. How can I do that though? What ...
5
votes
4answers
1k views

Selinux is denying access to mysqld

I have a script that dumps a mysql database. It then compresses the file and this gets stored in my home folder by using cron. The problem is I seem to be getting an error message. mysqldump: ...
4
votes
2answers
2k views

Hight iowait while the wMB/s is low

I was indexing a MySQL table. It makes a high load on that computer. It seems due to a high iowait. But it also shows that the wMB/s is only 2.87. Isn't even a common SATA HDD able to handle more ...
4
votes
4answers
281 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 ...
4
votes
1answer
1k views

How can I determine the connection method used by a MySQL client?

When using a MySQL client (e.g. mysql) how can I determine whether it connected to the server using a Unix socket file or by using TCP/IP?
4
votes
1answer
128 views

If I'm logged in as root, how do I restart mysql or apache with options?

I know the commands to restart/stop/start, but when I try to pass options it doesn't seem to work! CENTOS 6, MySQL 5.14 service mysql restart service httpd restart Then I tried this: ...
4
votes
3answers
462 views

rlwrap: mysql autocompletion not working

Normally, autocompletion works fine in mysql command-line client (mysql-client-5.5). I have a table called booking. When I type the letter b and pres TAB the name of my table gets autocompleted: ...
4
votes
4answers
4k views

How can I check if mysql is installed using a bash script?

I need to check if mysql is installed from within a bash script. What would be an efficient way of doing that? I thought I could do this: if [ ! -f `which mysql` ] ; then echo "foo" fi But I ...
4
votes
1answer
354 views

MySQL server-id not being set with Fedora 16

I am setting up a mysql slave on a Fedora 16 system, and the server_id is not being set properly. My /etc/my.cnf is: [mysqld] server-id=16 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock ...
4
votes
1answer
38 views

I get the Error “mysqld dead but pid file exists”

I get the Error mysqld dead but pid file exists This happens every couple of hours. If I restart it works fine and then goes down again. [root@ip-10-0-0-149 log]# df -h Filesystem Size Used Avail ...
4
votes
1answer
843 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 ...
3
votes
5answers
603 views

bash restart mysql when it gone run well in SSH part, but not in cronjob

My system is centos 6.5, I write a simple bash shell to check if mysql is crashed, restart service again. I put it in /home/myspace/mysql.sh chown root:root /home/myspace/mysql.sh then run every ...
3
votes
1answer
2k views

Can't start mysql on Fedora 19

I'm running Fedora 19 and I have installed MySQL using yum install mysql. When I issue the mysql command, I get the following error message: ERROR 2002 (HY000): Can't connect to local MySQL ...
3
votes
3answers
794 views

Encrypt a password the same way mysql does

I've created a user ... but forgotten the password mysql> create user 'blayo'@'%' identified by 'right'; Which Linux command line tool can encrypt the password the same way mysql 5.5 does ? ...
3
votes
1answer
94 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
1answer
894 views

How to increase the size of rootfs?

So I got this error today and decided to investigate: /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed! I'm not sure how... but I've filled up my rootfs ...
3
votes
2answers
3k views

Mysql query resultset in bash script

I am using the bash script to connect to the mysql database and execute a query. I use the below script to connect to the database and execute the query. #!/bin/bash Total_Results=$(mysql -h ...
3
votes
1answer
828 views

Convert mysql count(*) to int in bash?

I'd like to execute this and check if count is 0, 1 or > 1 in bash. mysql -e "select count(*) from mydb.mydb;" The output is: +----------+ | count(*) | +----------+ | 0 | +----------+ I ...
3
votes
1answer
39 views

How to interpret the following pattern of uptime data?

I have a small web server running mysql and wordpress which after a while appears to stop processing web requests. I can't even log into the server via ssh as ssh client times out when trying to ...
3
votes
2answers
51 views

How to make Cron run

I am trying to set up cron to run the mysqlauditgrep command (its the MySQL 5.6 Utilities package). The mysqlauditgrep command is in bash. The command I am looking to run is: mysqlauditgrep ...
3
votes
3answers
2k views

MySQL Linux Client Timeout/Keepalive

Is there a way to set a keepalive in the command-line MySQL client on Linux? Our network recently moved to a VLAN setup, and our systems department no longer has control of the firewall. The ...
3
votes
2answers
994 views

MySQL 5.1 to 5.5: all UTF-8 characters lost!

I decided to upgrade my Debian installation, and after some days using MySQL 5.5, I found that mysql prints garbage to the terminal intead of UTF-8 characters. I had a look at the SQL file that was ...
3
votes
1answer
2k views

How to enable an federated storage engine in the Debian MySQL package?

How would I enable an extra (in this case FEDERATED) storage engine in the mysql-server-5.1 package from Debian? I've installed mysql-server-5.1 via apt-get. But the SHOW ENGINES shows that federated ...
3
votes
2answers
113 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: ...
3
votes
2answers
451 views

Error establishing a database connection; how can I determine whether or not these connections are real?

I've just run into a problem today with MySQL reaching its database connection capacity. The error I'm receiving is, Error establishing a database connection. When I try to access /phpma, I get this ...
3
votes
2answers
358 views

Trying to create tunnel to mysql through SSH

Im in a bit of a bind here. I have a client that want's me to set up his website, but he runs the server w/ SSH and CentOS 6.2 as it's OS. Now, I'm trying to add the sql server on Mysql Workbench for ...
3
votes
3answers
529 views

How to force rpm to check dependencies during upgrade?

We have a current version of our software that has a dependency on MySQL 5.1 and this is specified in the RPM requires. For our new version, we now require MySQL 5.5 and specify this in the RPM ...
3
votes
2answers
2k views

'mysql' user and group creation, ownership settings

I know what the linux command chown does, I used it to change the ownership or group of a file. If there is a MySQL installation on a Ubuntu machine, I saw some people doing the following thing: ...
3
votes
2answers
612 views

Installing php-cgi under Ubuntu for Cherokee web server

I have set up Cherokee web server on my server, and want to enable PHP and MySQL support for applications like Wordpress and phpBB. I have tried running these commands: sudo apt-get install php5 ...
3
votes
3answers
1k views

How can I upgrade MySQL in Debian using apt-get?

I'm using the Turnkey Linux virtual machine. The version of Debian in there is apparently on the "Wheezy" upgrade path (if that's what you call it). I'm not completely comfortable with Linux, as you ...
3
votes
1answer
205 views

MySQL server won't install to a new os (Debian, Ubuntu)

Today I wanted to install (on a new VPS with new OS) a MySQL server. I used this command: apt-get install mysql-server mysql-common mysql-client-5.5 I tried with Debian 7 (x64 and x86) and Ubuntu ...
2
votes
1answer
4k views

start mysql server at boot for debian

I am using Debian Etch and I have following this and tried to write a script like this to auto start mysql server at boot: #! /bin/sh # /etc/init.d/blah # # Some things that run always sudo ...
2
votes
2answers
957 views

SFTP with Mysql user pass instead of PAM

Is there a way for people to log onto a debian server via sftp using just mysql database table as authentaction. IE not adding a user to the system? I know it can be done over ftp and TLS but i ...
2
votes
3answers
397 views

Do I need to stop processes like mysql or apache before “reboot”?

I have been wondering if issuing a reboot command safely stops running LAMP processes like MySQL or Apache?
2
votes
1answer
138 views

redirect error out to standard output

I can save the error out in the same file as standard out. I have used this method below. The problem is that the error out is "always" shown at the top. In the example given below the error relates ...
2
votes
2answers
2k views

How to grant a “no-root-user” rights to start/stop/restart mysql server on suse machine?

Is it possible to grant priviliges to a "no-root-user" to start and/stop/restart the mysql server on a suse machine? The goal is to make it for a developer possible to tune a mysql server/database ...
2
votes
1answer
1k views

Install MySQL from Bash Script

I'm coding a bash script to automate the process of deploying VPS servers but I'm having some trouble while trying to install MySQL from either aptitude/apt-get or yum, this is what I have so far: if ...
2
votes
1answer
50 views

mysql console, keeps outputting garbled text if 'b' key is pressed

mysql -u username -p mysql> Now in the console whenever I press the b key the screen goes berserk with garbled text: Google doesn't help here. Edit: using ubuntu 12.10 with xterm or the ...
2
votes
2answers
4k views

Can I copy a MySQL database by copying the files? What do the files contain exactly?

I am using MySQL database and using an Ubuntu Linux machine. My database named db_test , I notice that under path /var/lib/mysql/db_test ,there are files suffix with .frm, .MYD, .MYI like following: ...
2
votes
1answer
63 views

how to Connect to Mysql only once?

I have created a shell script to connect to a DB and INSERT IPs and MACs from dhcpd.log file the scripts worked properly: #/!bin/bash #Defining Variables dhcpLogFile="/var/log/dhcpd.log" #Begin Code ...