New answers tagged

1

Note to future travelers: It depends on your specific configuration but this is very likely an issue with apparmor. If you don't want to disable locking take a look at syslog and see if you're getting apparmor denies on that file. You'll see something like: apparmor="DENIED" operation="open" parent=29871 profile="/usr/sbin/mysqld" ...


5

This is less to do with mysql and more to do with python. When you start a process, it inherits a lot of information from the process that created it, including its file descriptors. What your finding is that mysql inherits the listening socket your process created when it spawned. To resolve this, you need to change your python code to not use ...


3

It's not possible to run MySQL on UDP port, or using ICMP informational messages. Just because of it's design - it's a TCP application. To run it on UDP port it has to be rewritten in it's network part from scratch, to use UDP instead of TCP, which it's using now. Since it's opensource, it's pretty doable, but nobody so far have tried it. Mostly because ...


1

So the one thing to know about cron is its like env-less. So it might not know about /root/.my.cnf You might want to try the following flag to point to the full path to the config that stores the user/pass --defaults-file=/root/.my.cnf


2

This is happened to me also. The thing is that amazon is trying to install php/mysql of older versions . you need to specify which version you need to install. to install php-mysql for php 5.6 issue this command. sudo yum -y install php56-mysqlnd You can install older versions if you want to.


0

As @Mugurel said, 'mysql' has been depreciated. To get my repertoire of tools working, I compiled with ./configure --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd (among the other options I use). Your configure options are a bit different, so perhaps you'll have luck massaging them a bit. Unfortunately, I haven't yet seen solid documentation ...


3

sudo iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT This is almost certainly your problem. The default firewall for CentOS would put that rule into the INPUT chain after the DROP all rule. This means that the rule is never acted upon. Use iptables -I INPUT ... to insert a rule into the beginning of your chain and you should be good to ...


1

nmap it and you will see what ports are open. ping doesn't say much.


0

Run a command like below to access from all machines. mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;


1

Open the file /etc/init.d/mysql /etc/init.d/mysql2 and find the following section # Lock directory for RedHat / SuSE. lockdir='/var/lock/subsys' lock_file_path="$lockdir/mysql" Change lock_file_path="$lockdir/mysql" to lock_file_path="$lockdir/mysql2" Should fix the issue :)


0

I'm sure I tried this earlier, but I must've typo'ed something, as it's now working. Posting the answer just in case anyone else gets confused by this. Set up an ssh tunnel on the remote client with: ssh -i nat.pem -f -N -L 3305:rds.endpoint.aws.com:3306 ec2-user@nat.ip then just mysql -h 127.0.0.1 -P 3305 -u user -p


1

Surprisingly sudo yum install php5-mysqli this did not install mysqli package for me. More surprisingly, I have PHP Version 5.5.31 and I assumed, it had installed mysqli by default. But I was wrong. I had to install and rebuild apache from WHM. To install mysqli using EachApache: Login to WHM as 'root' user. Either search for "EasyApache" or go to ...


0

thanks, changing myisam tables to innodb solved the problem, now mysql CPU is at most 300% and normal load average peak 5%


1

That is how MySQL works. DBMS should guarantee so-called "integrity" (ACID-ity) of data so most of operations have lock an access to the specific table(s). Until operation will be completed no other operation should be started at any circumstances. All queries are queued in the line and performed one by one sequentially. Some DB-engines allow to lock not ...


0

Set your ~/.ssh/config to include 'ForwardAgent yes'. Also grant all on db.* to 'user'@'127.0.0.1' identified by 'password'


0

Bit of a shot in the dark but I've seen this before and managed to debug it. Its a real bizarre edgecase though. If your clocksource is set to jiffies certain processors do not stay in sync with one another, leading to a situation where the time on one processor differs from the time on another processor. It can be out be a difference of only 1 second for ...


0

The mention of 127.0.0.1 sounds like you are using the SSH tunnelling feature of SequelPro. See How to reliably keep an SSH tunnel open for solutions to this problem. You can be certain this issue issue if the next time it happens, you disconnect your SSH session to the server, re-connect, and it works.


0

Looks like you're having issues connecting through SSH or maintaining the SSH tunnel, these errors are usually reported to /var/log/auth.log. Probably SequelPRO tries to use a connection that is no longer available, stalled. You may also try to manually set the SSH tunnel: http://www.sequelpro.com/docs/Set_up_an_SSH_Tunnel — if this works, then it's surely ...


0

Altough in the time, when the question was asked, it was really impossible, but it is possible nowadays. You can to both: UNIX=>TCP and UNIX=>UNIX forwarding. For example: ssh \ -R/var/run/mysql.sock:/var/run/mysql.sock \ -R127.0.0.1:3306:/var/run/mysql.sock \ somehost It is possible since OpenSSH 6.7.


0

Have you tried updating the db? You can use the following commands changing xx.xxx.x.xxx into the IP of the nginx server, and the placeholders for the real values: mysql> update db set Host='xx.xxx.x.xxx' where Db='placeholder_db'; mysql> update user set Host='xx.xxx.x.xxx' where user='placeholder_user';


0

Unfortunately MySQL only creates one binary log for all databases that are running in the instance so the slave will transfer the entire binary log and then filter which statements it runs based on the replication-do statements. You can get around this by running multiple instances of MySQL for the two different databases but that has its own drawbacks and ...


1

I found the answer here, after HBruijn set me on the right path: https://mariadb.com/kb/en/mariadb/configuring-mariadb-for-remote-client-access/ MariaDB has the skip-networking directive active as default, which stops all TCP/IP connections. After commenting it out, but leaving bind-address as is I let MariaDB listen to TCP on the default port (3306) only ...


2

Your server is running out of memory so badly it has to start randomly killing processes to survive. You can either get more RAM, or reduce the amount you are using. The 'top' command will show you all the running processes and how much memory they are using. 'free -m' will show you how much RAM you have and how much you are using. Remove processes and ...


0

The solution that worked for me was to change smtpd_sasl_type = cyrus to smtpd_sasl_type = dovecot and make sure dovecot-imapd is installed.


0

I used 'Rui Pedro Bernardino's solution. Works great except I changed a couple things in the first line as detailed below... tcpdump -i any -s 0 -l -vvv -w - dst port 3306 | strings | perl -e 'while(<>) { chomp; next if /^[^ ]+[ ]*$/; if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER)/i) { if (defined $q) { print "$q\n"; ...


0

The very first line tells you about the problem: janv. 29 10:51:15 clicshopping mysqld_safe[20076]: 160129 10:51:15 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect. You responded to that by saying this: in var/log/mysql/error.log, i deleted all data, does'nt ...


0

Seems like your 'mysql.plugin' table is not exsist or mysql data dir is not owned by mysql user.


0

Starting mysqld daemon with databases from /var/lib/mysql You didn't change the datadir in /etc/my.cnf or wherever your distro places it. Changing it to datadir=/home/mysql should fix your problem.


0

Fixed. Add no-external-locking to my.cnf under the [mysqld] section, and then reboot the entire system. This should fix it, for anyone who finds this. Also if you backed up your data, then attempted to restore and were told to rm ib* to make it work, you need the ibdata file.


0

0xc000007b decodes to: # for hex 0xc000007b / decimal -1073741701 STATUS_INVALID_IMAGE_FORMAT ntstatus.h # {Bad Image} # %hs is either not designed to run on Windows or it contains # an error. Try installing the program again using the # original installation media or contact your system # administrator or the software ...


0

I have downloaded PHP 7.0.2 and the mysql folder is missing from the ext directory. Looking further into this I realized they removed this function: https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 It works on PHP 5.5 because it was only DEPRECATED in it, but it seems now they've completely removed it. According to the wiki, it's available ...


0

If you have binary logging turned on then you can just recreate a table first if you have schema. Make sure you create schema while you have binlogs turned off. Or you can just skip for the session. Then you can replay the binlogs up until the last statement which was drop table itself. If not then you can restore using a backup dump if you have any. If ...


-1

By default Linux VMs don't have any swap enabled... When you fire up a VM, a random "compute node" is chosen that has the capacity for the size of the VM that you chose. Compute Node, is just a highly modified machine with Hyper-V installed. Your OS disk; /dev/sda is not local to that server, and therefore not as fast as local storage. (and also subject ...


0

innodb_buffer_pool_instances: You cannot see its effect unless innodb_buffer_pool_size is few gigs, dividing the buffer pool into separate instances can improve efficiency. This is also a tuning practice for innodb_buffer_pool_instance so that each buffer pool instance is at least 1GB. eg, If innodb_buffer_pool_size = 4GB then, ...


1

After days of fighting with this, I was finally able to get this to work. The key issue is that the default Docker image (probably mimicking what the MySQL image does) adds timezone data in the database, and for whatever reason (maybe because it uses MyISAM tables?) that causes huge problems with this setup. Solution: when launching the first node, pass ...


0

In general, you should consider 1) MySQL bind-address, and 2) the firewall. Since you aren't able to make a connection with telnet SERVER_IP 3306, either the firewall is blocking the connection or MySQL is not listening on that port. Firewall You should review your firewall rules as a set, without piping to grep, to see if there are any matching rules ...


2

The PPA repository does not contain any packages for mysql 5.7: There are no deb files. Just take a look with your browser: http://ppa.launchpad.net/ondrej/mysql-5.7/ubuntu/pool/main/m/mysql-5.7/ And on the status page it actually says: mysql-5.7 38 weeks ago Failed to build: amd64 i386 So at least for this ppa you are out of luck ;-( Therefore I ...


4

**Please run below command -:** wget http://dev.mysql.com/get/mysql-apt-config_0.3.2-1ubuntu14.04_all.deb sudo dpkg -i mysql-apt-config_0.3.2-1ubuntu14.04_all.deb sudo apt-get update sudo apt-get install mysql-server-5.7


0

I already fix the replication by run the mysql_upgrade that I forgot to run after updating MariaDB from 5 to 10. Thanks


0

First, huge transactions and LOAD DATA INFILEon galera cluster is still a known limitation, if you have to it is advised to split these transactions by 5k-10k trx's or lesser YMMV. Try to increase wsrep-max-ws-size. Set innodb_flush_log_at_trx_commit=0 on all nodes.


0

first of all, adding information about Linux flavor in use would help a lot in this case. command: "lsb_release -a" or checking /etc/redhat-release and /etc/debian_version would provide more details related to OS in question. Can't write to file can be error from: permissions (ACL) if ownership + filemode for directory is correct: check with command "stat ...


0

Had the same problem upgrading from 5.1 to 5.5. This worked for me: sudo mysql_upgrade -S <path-to-socket> -u <myuser> -p<mypass> My error was probably caused by permissions to the socket path, but haven't the time to verify it was the cause.


1

You have SELinux enabled, and you moved the files instead of copying them. Therefore they have their original context (probably user_home_t or something similar) rather than the necessary context for MySQL to use them. To solve the problem, put the files in the correct place in the directory structure (probably /var/lib/mysql/nordwind and run restorecon on ...


0

I'll just put this here in case someone else needs it cause I literally just stumbled upon the answer now through trial and error, after an entire day of troubleshooting this issue. I read so many posts and blogs and none of them recommended adding the max_connections directive to my.cnf. After adding the following lines, all my issues cleared up and ...


1

This should work if you add them as separate users. You can use loops and pillars as usual, but the expanded version would look like this: EDIT: mysql_user.present now has parameter - name: frank frank_10.0.0.1: mysql_user.present: - name: frank - host: 10.0.0.1 - password: topsecret mysql_grants.present: - grant: select - ...


0

There was a MySQL 5.6 bug, fixed in 5.6.9: "if the db name (or table name) has a '-' (minus), it does not work", on InnoDB only.


0

When using MySQL 5.6+, I would recommend using the mysql_config_editor command to create an entry for the user 'debian-sys-maint'@'localhost' using the relevant password, meaning the password does not need to be stored in plain text on the server. mysql_config_editor set --login-path=debian-sys-maint --host=localhost --user=debian-sys-maint --password ...


0

The later looks like a daemon launched from systemd/upstart without the SysV compatibility layer (the init.d script; init.d scripts are actually depreciated). Try checking for an /etc/init/mysql* file.


0

Regarding how to log MySQL queries, this question has already been answered on StackExchange sites: How to Enable MySQL query log? How to log all MySQL queries to a file? Logging all queries in MySQL Once you find the queries involved, you can work on how reduce or optimize them. Questions about optimizing the queries may be better suited for ...


0

How about this? DELETE FROM mysql.user where user like "wiki4te%" and host like "rch%";



Top 50 recent answers are included