New answers tagged

0

I manage to start the server using #mysqld_safe --innodb_force_recovery 4 . I have tried hundreds of time to restart the mysql server but like this started. After I restored the backups that I was able to make and everything seems to work properly.


0

$ cd /usr/lcoal/mysql/ $ ls -l $ sudo -R chown mysql:mysql data/ data/ is a directory under /usr/local/mysql/ which contains all the database. Now do mysql -u user -p password. You can access your database


3

Normally to protect the data and to version your application you would separate any data from the container, you can do this with docker volumes, cloud block storage or object storage in your application, depending on the use case - storage persists even after you destroy the container and you can attach and detach the volumes between containers etc. ...


0

I have the same problem, even with the command : sudo service mysql status The result was: status: Unknown job: mysql But it work perfect with: /etc/init.d/mysql start And also like Shardan said, you can purge, update and install it again.


1

I think you are using a multi backed cinder that can create volumes by using the netapp and lvm drivers - sometimes volumes can become stuck in any type of status 'create, extend, snapshot, delete etc. there is already a cli and horizon tool for resetting the status of stuck volumes, since you can't delete a volume that is stuck at a different status: ...


0

The steps you described looks good for me. You don't need to use sudo for the openssl commands, though. After those you have to import the CA certificate into the java trust store. It is called "cacerts" and dwells in the <path_to_jre>/security/ directory. Simply import the certificate with the following command: keytool -import -trustcacerts ...


0

Once you are in phpMyAdmin, look for the horizontal menu: Dashboard | Sql | Status | Users ...etc Click on Variables. Here you will find all the variables for mySql server. You can try the search box for specific variables. Good Luck.


0

Before you ran mysql_secure_installation you changed to a directory that no longer exists. To resolve the problem, change to a directory that exists, and run it again.


0

My money is on "configuration" – but probably in the opposite way you anticipate... I suspect you've configured it too much. It looks to me as if you've been "tuning" your server's performance right into the ground. If you have been using a "tuning" script – stop doing that. For example... table_definition_cache=6000 and table_open_cache=6000 ...


2

Try following: # yum install --enablerepo=mysql56-community install mysql-community-server Loaded plugins: fastestmirror, langpacks, nvidia Loading mirror speeds from cached hostfile * base: mirror.metrocast.net * elrepo: mirror.symnds.com * epel: mirror.metrocast.net * extras: mirror.metrocast.net * nux-dextop: mirror.li.nux.ro * updates: ...


0

Can you post your /var/log/messages? The first I can think about is to clear your /var/lib/mysql directory and create a symlink from your /home/mysql to /var/lib/mysql and so on for your PID and sock files Then you'll have enough space and can try to start the service again. Can you try it? You also can look here for some examples.


0

From your question it looks like PHP process gets hung during the interaction with MySQL. I would suggest enabling slow queries and trace the time taking queries.


3

Have you checked: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1571865 (linked from the XenialXerus release notes at https://wiki.ubuntu.com/XenialXerus/ReleaseNotes#MySQL_5.7)? It explains that due to changes in the name of some configuration directives, starting mysql fails. It also mentions three solutions, the first of which solved my ...


0

While a full analysis is a complex and difficult task, I can suggest a few areas from the information you have provided, and the warnings in the tuner. 1) You have 32GB RAM, but are only using 14GB for MySQL on a dedicated machine. Why not give it more? It's suggested 75% of RAM should be used by MySQL on a dedicated host (innodb_buffer_pool_size), but you ...


0

I fixed the issue. The solution was simple in the end and due the fact that I was using an apostrophe, which is incorrect syntax, instead of a backtick in the command: # mysql_upgrade -uadmin -pcat /etc/psa/.psa.shadow


2

No special escaping is needed: me@orange ~$ mysqldump foo-bar -- MySQL dump 10.15 Distrib 10.0.24-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: foo-bar -- ------------------------------------------------------ -- Server version 10.0.24-MariaDB-7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...


1

You normally escape a hyphen - with quotes so I would expect the following to work: mysqldump --ignore-table='foo-bar.tl_log'


0

Per MySQL :: MySQL 5.7 Reference Manual :: 5.5.4 mysqldump — A Database Backup Program Try following: mysqldump --ignore-table=database.table1


0

Watch your /var/log/messages while you try to start it. You might find SELinux getting in the way: tail -f /var/log/messages Try to leave MariaDB at the expected location /var/lib/mysql. Options include: 1) If performance matters: shrink the filesystem and partition (or logical volume) on /home, then create a new partition and mount it at ...


1

Maybe your server goes low on memory and the OOM-killer kills the MariaDB process. To check if it the OOM-killer, do the following: grep -i oom /var/log/messages and grep -i oom /var/log/syslog dmesg | grep -o oom after detecting that MariaDB crashed/was stopped. If grep find something, chances are the OOM-killer is killing your database process.


0

It worked by adding testing repository, then running apt-get update, and then apt-get -f testing install mysql-server. It shows you what it's planning to do before it does it, and it just installs mysql 5.6 server and a couple updated libs.


0

I stumbled across this one, too, and the proposed solution didn't work, since the database specific privileges wouldn't be moved as well. what I did: UPDATE mysql.user SET Host='%' WHERE Host='localhost' AND User='username'; UPDATE mysql.db SET Host='%' WHERE Host='localhost' AND User='username'; FLUSH PRIVILEGES;


0

After a couple of hours of head scratching, rebooting, etc. the only solution I found (by the tried and true method of throwing crap against the wall to see if it sticks) was to export the database schema and data (I did these separately, that probably doesn't matter), drop the database, recreate it, and reimport the data. Now I get no complaints. And yes ...


0

Sounds like you need another server for archiving. I used to have this issue and loading up another server purely for archival storage was the best strategy for me. It improved my throughput on the live DB server significantly and still gave access to the archived data on the archival DB server.


0

1: Change the port from 3306. Not for reason of better security, but to take the load of the server to deal with false login attacks 2: Create SSL certificate and enable it on your MySQL server (it's a must-have to encrypt your client-server connection anyway) 3: Create one or more client certificates (all clients need to have the certificate and the ...


0

because there are two method to connect to mysql. the time when you install mysql and that time it ask which way you wana go 1st is unix sock which is very served and gives you good performance and the 2nd one is TCP/ip and please do check the privileges either you can connect to you db remotely just used some other ip if no then you and enable to the ...


0

See the mysql bug that could be applied to you. Apparently you can get rid of this error limiting the "table_open_cache" configuration to a higher number (500)


0

My test: $ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.12 MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may ...


0

login_log has nothing to with the mysql, if your database connection is breaking everyday that means there is something going on server which needs to troubleshooted at the earliest. The details provided by you here is very less to examine why mysql service is getting down on regular basis. As you said you have managed VPS from go-daddy, they should help you ...


0

This has probably been answered a few times already but here we go again. Here is how cPanel does this and you might want to follow: create database db1 create a localhost user with some password assign the user to the database assign the needed privileges to this user for that database (cPanel assigns them globally for all tables in the database but you ...


0

One-liner doing pretty much the same as the awesome pt-show-grants: mysql --skip-column-names -A -e"SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') FROM mysql.user WHERE user<>''" | mysql --skip-column-names -A | sed 's/$/;/g' Based on unix tools only, no additional software needed. Execute from within a bash shell, assumed is you have ...


1

You grant rights according to what your application needs. If all your application requires is SELECT on a single table, then that's all the user should be granted. There's no "guide" on this, as it's completely depending on the application owner understanding what the requirements of the application actually are.


0

You are trying to kill the short-lived process, even if you managed to do that it wouldn't help. You need to determine where the source is. You can look at the logs for that, the logs for whatever might connect as vmail (dovecot maybe, or an apache phpmyadmin or webmail?). You can stop that process if you wish to stop the problem at the expense of stopping ...


10

Normally each database is already in a subdirectory of its own. From the manual : A database in MySQL is implemented as a directory containing files that correspond to tables in the database. Because there are no tables in a database when it is initially created, the CREATE DATABASE statement creates only a directory under the MySQL data directory and ...


2

Most MySQL installations come with networking disabled by default, e.g the my.cnf contains a line similiar to bind-address = 127.0.0.1 which limits the network access to localhost for security reasons. If you choose to enable networking by altering this line you need to make sure that you reconfigure all your MySQL users, to distinguish between local and ...


1

MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. MySQL Workbench is available on Windows, Linux and Mac OS X. MySQL :: MySQL Workbench


2

The exact answer will depend on the workload. Performance If you get another VPS with the same specs as the first, you will have twice the memory, twice the CPU, twice the disk, and twice the network. If you are able to utilize all those resources, you may get better performance from two VPS than doubling just the memory of your current. However if you ...


0

Since there is a lot to scroll through on bigmandan's answer, I think it might make sense to also post it here to make it easier to find. For Windows, this is the fix. [3 Jun 2015 15:27] Mike Hadrup Also tested on Windows 10 64 bit with MySQL Workbench 6.3.3.0 (592) msi and noinstall against Debian 8 Jessie with OpenSSH 6.7 download zip from ...


0

seems to be a common error, perhaps InnoDB is configured to use more memory than you physically have, have you looked here: http://stackoverflow.com/questions/12114746/mysqld-service-stops-once-a-day-on-ec2-server/12683951#12683951


2

The problem was related to ISPConfig, which created entries in /etc/fstab. The new default init-system systemd does not accept the lines any more (compared to sysvinit). I found the solution by using journalctl -xb. Perhaps it helps someone else as well. I added nofail to the entries in /etc/fstab to fix the boot-problems, e.g.: # cat /etc/fstab ...


0

You could also add back the "mysql" user either with adduser command or by editing the files /etc/passwd, /etc/shadow and /etc/group. You can have the previous ids of the user and group from the legacy "mysql" files


1

I'd reinstall mysql package. Re-installing the package does not delete your data (Source), so I'd do the following: Backup mysql data folder using cp -ar /var/lib/mysql /safeplace Remove the package: apt-get remove mysql-server Reinstall the package apt-get install mysql-server


0

We've seen this when the disk for the temporary tables runs out of space, due to poorly written joins. The temporary tables are transitory, so it's hard to catch in the act.


0

Windows server 2008 r2 standard is connecting 24 cilent machines What do you mean with this? In Windows server 2008 r2 maintaining the mysql database and all other client machines are pointing to mysql database server. So, you are not talking about Windows here, but MySQL Being slow.... so, let's have a look at your machine... OS; Processor, ...


1

I had almost the same problem. I solved it this way: 1) Insert into my.cnf this line: init_file = /some-path/startup.sql 2) In the file startup.sql you have these MySQL commands: CREATE TABLE IF NOT EXISTS MySqlServerLog ( MySqlServerStarted DATETIME ); INSERT INTO MySqlServerLog SET MySqlServerStarted = NOW(); Each time you start/restart the MySQL ...


-3

Some good answers, but don't forget that NONE of the default installs are very secure as they are meant to be used in the widest possible range of situations. Seriously, if you think a default install of Apache on Linux is secure... guess again.


0

What you want to do is called a physical backup, in the sense you are copying the raw database files. The safer bet is to stop mysql and copy the entire directory - in other words, what you are already doing. You see an older modification time on your backup probably because when you restart the mysql service, the table files are touched, and their last ...


0

You cannot simply copy MySQL file to take a backup. It will be inconsistent and most likely corrupt. On Windows with MyISAM table (I assume there are no InnoDB tables) you have following backup options: mysqlhotcopy (it copies files but wraps it with FLUSH TABLES WITH READ LOCK) mysqldump/mysqlpump a slave for cold backups Oracle's MySQL Enterprise Backup ...


1

maybe, use following method instead: MySQL :: MySQL 5.7 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program


2

This question is a bit outdated but I thought I'd post how I resolved this issue when it happened to me on my Mac (OS X El Capitan 10.11.4). Check the status just to be sure mysql.server status ERROR! MySQL is running but PID file could not be found Find all running mysql processes ps aux | grep mysql It will list out all the processes using ...



Top 50 recent answers are included