An open-source, relational database management system.
8
votes
1answer
422 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
2k 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
209 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
170 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?
6
votes
0answers
430 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 ...
5
votes
3answers
2k 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
625 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
1k 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
496 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
1answer
102 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
1answer
155 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
3answers
885 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
296 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
2answers
532 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 ...
3
votes
2answers
388 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
885 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
1answer
4k 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 ...
3
votes
2answers
255 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
3answers
354 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
4answers
2k 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 ...
3
votes
2answers
613 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
412 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
176 views
MySQL stop/waiting issues; “can't connect … through socket”
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 ...
2
votes
2answers
618 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
1answer
454 views
crypt() on different machines
Because of a hardware issue i need to migrate many virtual users to a new machine. Their passwords stored in MySQL encrypted with ENCRYPT which using crypt()eventually.
Maybe it's my fault but salt ...
2
votes
3answers
44 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
2k 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
726 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
24 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
2k 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
2answers
780 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 ...
2
votes
1answer
403 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
127 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
700 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
137 views
mysql replication not working
I have two servers A and B I tried to setup replication between two servers for fixed dbs DBA and DBB but it's not working my configurations Tables are not getting updated why??
Master:(/etc/my.cnf)
...
2
votes
2answers
272 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 ...
2
votes
1answer
214 views
Bash script and Database
I have an iptables firewall in Linux bridge (RHEL5). I want to extract information like IP address, port number, port type, date and time, etc. from log messages using a Bash script, and then want to ...
2
votes
2answers
20 views
How to config my.cfg file for mysql which was installed from sources?
I installed MySQL 5.6 from sources on debian.
MySQL folder is /usr/local/mysql.
Here is several question:
1) I would like to config my.cfg. But I couldn't find several parameters:
socket ...
2
votes
2answers
258 views
Building MariaDB 5.5.27 without OQGraph: How to deselect the plugin?
I'm trying to build MariaDB 5.5.27 from source. In fact, I just need the client, but I seem to have to build the complete database system anyway.
While configuring with cmake and later compiling with ...
2
votes
1answer
281 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 ...
2
votes
1answer
700 views
Mysql / swap space full
I have MySQL Ver 14.12 Distrib 5.0.45 server running on Multiflex Intel Blade having 8G of RAM & 8 x Intel(R) Xeon(R) CPU E5410 @ 2.33GHz.
The problems I am facing are:
For the last 3-4 days ...
2
votes
1answer
98 views
How to copy the whole MySQL DB between two servers?
There is a very good connection between the two machines (MySQL 5.5.28):
mysqldump -u root -p'password' --all-databases | ssh root@SERVERNAME mysql -u root -p'password' --all-databases
So AFAIK ...
2
votes
0answers
60 views
No communication services enabled following startup
I recently installed Parsix (Debian) on my system, and I've been struggling to figure out how to autostart my services. Of the list of services that don't run and should run are:
ssh
apache
mysql
...
2
votes
0answers
673 views
MySQL socket and PHP (and other languages)
Background info
I'm currently running CentOS (or Red Hat?).
uname -a gives (I edited out my domain name)
Linux XXXXXXXXX.com 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 ...
1
vote
2answers
164 views
How do I set the mysql server character set in FreeBSD 8.2?
My mysql server's current server character set is latin1. My server is started on startup via rc.conf setting mysql_enable="YES". How to set my server to use utf8 as the server character set?
1
vote
4answers
468 views
Multiple Mysql databases backup tool?
My OS is Ubuntu 10.10.
I have several small sites (all on various shared hosts) and I'm thinking that it'd be probably good idea to regularly backup mysql databases from these remote shared hosts. I ...
1
vote
3answers
56 views
Upgrade MySQL 5.0.88 to 5.1.69
I am upgrading my MySQL installation on a Fedora 10 (and 14) box (in test first.) I have made a system image (it is a VM) and have downloaded MySQL Server Community 5.1.69-1 from the MySQL site.
Once ...
1
vote
2answers
126 views
Import sql files using xargs
I have a number of sql files to import. For a single file I use the following command:
mysql -u root -p dbname < db.sql
Is it possible to use xargs to bulk import all files? something like:
ls ...
1
vote
1answer
234 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 ...
1
vote
2answers
322 views
Script that uses MySQL query to automatically remove output
I have this query that outputs updates older than 7 days from a database. How would I make a script that takes the MySQL statement and puts it into a script to be executed by cron.
echo "select name, ...
