An open-source, relational database management system.

learn more… | top users | synonyms

14
votes
2answers
434 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 ...
8
votes
1answer
476 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
282 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
366 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
2answers
1k 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 ...
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
771 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 ...
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
5answers
710 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
4answers
187 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
10k 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 ...
4
votes
1answer
121 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
317 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
298 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
622 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 ...
4
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: ...
3
votes
3answers
614 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
77 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
933 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
1answer
622 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
645 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
27 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
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
833 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
965 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?
3
votes
1answer
1k 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
97 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
400 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
336 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
470 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
1k 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
571 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
0answers
42 views

Why does the php 'date' function returns a wrong time (off by ~24 seconds)? [migrated]

I have the following small php snippet running on a gentoo Linux (php version 5.2.10-pl0-gentoo): #!/usr/bin/php5 <? class TestDaemon { public function __construct(){ while (TRUE){ ...
3
votes
1answer
65 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
2answers
856 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
306 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
3k 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
1answer
101 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
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
47 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
3k 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
67 views

strings command printing some extra characters

I am trying to capture mysql traffic using tcpdump and converting it to text using strings command, but while capturing mysql traffic, I am getting some extra character at the end of each character. I ...
2
votes
1answer
591 views

How to script a database migration using SSH?

I am trying to create a sync.sh script that coordinates with our less-than-ideal version control for our website. This script will migrate a copy of the live database to our local development ...
2
votes
2answers
188 views

List files that occur lexically after/greater than a given prefix (or, run database upgrade scripts in a proper order)

I'm trying to create a shell script that runs through a bunch of SQL scripts. I've these files: $ ls upgrade/ 01-foo.sql 02-bar.sql 02-baz.sql 03-foo1.sql 04-buz.sql And I've got the version of ...
2
votes
2answers
939 views

Postfix cannot find a MySQL shared library

I am trying to install Postfix with MySQL support. When I start or run the postfix daemon, it complains that it "cannot find libmysqlclient.so.18", which is in the directory /usr/local/mysql/lib, ...
2
votes
1answer
39 views

cronjob for automatic DB backup to date prefixed file

I am using the latest Linux Mint. I was wondering if it's possible to create a special cronjob for a database backup. In my /etc/cronjob file I have the following code: # Minute Hour Day of ...
2
votes
2answers
39 views

Why does the root user have control over mysql directories but not show as a member of the mysql group?

Sorry if this is a duplicate. It seems somewhat similar to the question here but I think what I'm asking is a little different. I've got a CentOS 5.x box running with mysql on it. The root linux ...