New answers tagged

0

This should work: [mysqld] character-set-server=utf8 collation-server=utf8_general_ci init-connect='SET NAMES utf8' May be you need to define these options as well: [client] default-character-set=utf8 [mysql] default-character-set=utf8 Hope it helps. Cheers


0

Here are the step by step instructions to reset the MySQL root password from their manual: Stop the MySQL server if necessary, then restart it with the --skip-grant-tables option. This enables anyone to connect without a password and with all privileges, and disables account-management statements such as ALTER USER and SET PASSWORD. Because this is ...


0

For the sake of this answer, you want to replicate database mydb STEP 01 : Add Replication Filter to my.cnf on ServerD [mysqld] replication-do-db=mydb STEP 02 : Stop Replication on ServerD mysql> STOP SLAVE; mysql> FLUSH TABLES; mysql> FLUSH LOGS; mysql> SET GLOBAL innodb_fast_shutdown = 0; STEP 03 : Restart MySQL on ServerD service mysql ...


2

Typically if a MyISAM table has free space in the middle of the datafile after DELETE operations, it will insert the rows in that free space. However, due the way MyISAM implements concurrency, it depends on the workload what happens. From MySQL manual For a table with a hole, new rows are inserted at the end of the table if it is in use by another ...


1

If you have the FILE privilege you can, table by table, use SELECT ... INTO OUTFILE queries and download your data from those.


3

You can use the mysql_config_editor utility to store authentication credentials in an encrypted login path file named .mylogin.cnf. To create a new set of credentials run: mysql_config_editor set --host=db.host.org --user=dbuser --password and enter your password when prompted. This will store your authentication credentials in the default client login ...


0

Try these things: Try login by using vagrant as username instead of root, if that satisfies your problem. Other things you can try is: Changing the password for root. Check the users using: sudo mysql SELECT * FROM mysql.user Check if you have user named root then try: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; ...


0

In order to check your alias is working properly you can try to check your MySQL directly first. From your log I don't see any attempt delivering to your mailbox Select goto from alias For alias you should see something like this in your log 29 06:46:59 mail postfix/local[15339]: A8967BF907: to=<yourmailbox@domain.com>, orig_to=<youralias@...


2

Six years after this question was asked, I had to copy an 80 million row MYISAM table to a backup database (it was using 80% of the disk space of our whole database). I took the .MYI, .MYD, and .FRM files from the nightly backup, and copied them to the folder of a new running database. The information_schema was updated almost immediately, and all table ...


0

Per your post above, it appears that the reason the user isn't connecting the second time is due to it not receiving the correct password. Relevant: user@computer:~/$ mysql -u newuser -p Enter password: ERROR 1045 (28000): Access denied for user 'newuser'@'localhost' (using password: NO) user@computer:~/$ You will need to figure out the reason ...


0

According to your requirement, Let's start by making a new user called "chaminda" within the MySQL shell: CREATE USER 'chaminda'@'%' IDENTIFIED BY 'password'; The first thing to do is to provide the user with necessary permission and here I have given all permission to the particular user. GRANT ALL PRIVILEGES ON * . * TO 'chaminda'@'%'; Reload all ...


0

You can manually create a whitelist array whereby illuminating the query with its own vulnerabilities to obtain the whitelist.


-1

Please have a look at these links: https://forums.aws.amazon.com/message.jspa?messageID=320196 https://aws.amazon.com/premiumsupport/knowledge-center/rds-mysql-functions/


0

I had the same problem, it was a DOS attack. First, you need to check if you are a victim of this attack in the access log files, then set up fail2ban to prevent further attacks : I wrote a detailed solution about this issue here


0

The problem was that if you have a common config section which contains: source sCommon sql_query_pre = SET SESSION group_concat_max_len = 10000 but susequently, in a child config section which inherets the common config, define another sql_query_pre setting: source sUsers : sCommon sql_query_pre = SET NAMES utf8 these will overwrite any settings that ...


0

On some query it's not possible in a direct way. You must write the query result to a table through the create table as syntax And then you can follow the normal export instructions: http://serverfault.com/a/300342/256884


0

The wget command will download the package to your current directory . Once it is downloaded you can simply install it using the rpm command with the package name and not the complete link as rpm -Uvh mysql-community-release-el7-5.noarch.rpm In case this shows some unfulfilled dependencies , you can use yum localinstall mysql-community-release-el7-5....


0

Flush Logs is safe to do while replication is on, it only switches the current log file. The switching of log files is also done according to the max_binlog_size variable's value.


3

Do client certificate and key have to be generated with the same ca-key, as server certificates? No, the main requirement for the client certificate is that the server trusts the CA which has signed that client certificate. In theory you can even trust multiple CA's and use client certificates from completely different sources. Which CA has signed the ...


0

Well, I could not invent a way better then this: def mysql_version command('mysql -e "select version();"').stdout end def plain_mysql? mysql_version =~ /5.6.27-76.0-log/ end def mysql_package_name if plain_mysql? 'MySQL-client' else 'Percona-client' end end describe package(mysql_package_name) do it { should be_installed } end


0

Can you confirm your docker version? I was getting the same error, but after I updated to the latest version it started to work. I am now running: $ docker --version Docker version 1.12.0-rc2, build 906eacd, experimental $ docker-compose --version docker-compose version 1.8.0-rc1, build 9bf6bc6 Hope this helps with your problem.


1

MadHatter explained well the error. But since then the times have changed and now MySQL (since 5.6.2) has an option to ignore this directory. Just add this statement into your /etc/mysql/my.cnf file: ignore-db-dir=lost+found After MySQL restart you can check it with command: show global variables like 'ignore_db_dirs'; If you want to ignore multiple ...


0

Reference taken from this post. You can use below script: SELECT pl.id ,pl.user ,pl.state ,it.trx_id ,it.trx_mysql_thread_id ,it.trx_query AS query ,it.trx_id AS blocking_trx_id ,it.trx_mysql_thread_id AS blocking_thread ,it.trx_query AS blocking_query FROM information_schema.processlist AS pl INNER JOIN ...


0

You have set up pm.max_children to 30, which means that there can be only 30 concurrent PHP scripts running at the same time. When more users visit your sites, there aren't any free PHP processes to serve the request. nginx waits for some time, before returning the 504 Gateway Time-out error. You seem to have plenty of free memory, as your cached column ...


0

Ok, figured out the issue. The default settings of MS Sql use all cores of the server to execute large queries. We have large reads so it was stacking up a long line of queries waiting to be processed. To fix it, I set the Max Degree of Parallelism to be 2 cores instead of unlimited (8 in our server) and I set the Cost Threshold of Parallelism to 10 (...


0

use mysqltunner.pl to show you report -------- Performance Metrics ----------------------------------------------- [--] Total buffers: 168.0M global + 2.8M per thread (10 max threads) [OK] Maximum reached memory usage: 179.0M (18.04% of installed RAM) [OK] Maximum possible memory usage: 195.5M (19.70% of installed RAM) 2.8M is my every thread memory ...


1

Any directory in MySQL datadir is considered as database by MySQL. Most likely you have dedicated mount point for /var/lib/mysql with ext{4,3,2} filesystem and default 'lost+found' directory present (lost+found directory is used by file system check tools (fsck)). You can say MySQL to treat this directory as directory and not database with the help of ...


1

In a similar situation my team decided to use pt-kill (https://www.percona.com/doc/percona-toolkit/2.1/pt-kill.html). It can report on or kill queries that (among other things) are running for too long. It's then possible to run it in a cron every X minutes. Problem was that a query that had an unexpectedly long (e.g. indefinite) execution time locked a ...


0

The config you're after is called ip_nonlocal_bind. The failure you've posted mentions ip nonlocal_bind, so it's missing a _. So, check your config for this typo. If there are more problems you're running into, please edit your question stating exactly what is happening, what should happen, and provide configs etc.


0

Typically, the binaries for MySQL server for Windows that you can download from the MySQL website, have been compiled with SSL support. This means that the server supports this feature but it is not enabled by default. To double check that this is the case, we can connect to our instance via mysql -uroot -p (in Windows, mysql.exe is located in C:\Program ...


2

In MySQL 5.7 it is now possible to modify the innodb_buffer_pool size on the fly dynamically: 15.4.3.2 Configuring InnoDB Buffer Pool Size The new pool size must be a multiple of: innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances or will use the next highest multiple, if set to an invalid number.


1

As long as you're using the official CentOS repos, there shouldn't be any problems. That said, consider the following: Ensure you have a good, tested backup of the system before upgrading along with a quick way to revert your changes if the upgrade goes bad. Fire up another server, deploy your database on that server, and test the upgrade there before ...


0

I did what @RolandoMySQLDBA suggests but also adding a 6' and an 8' steps (this solves what @Hussain Tamboli comments.): Step 1) Setup a New Server (ServerC) Step 2) On ServerC, Install MySQL (same version as ServerB) Step 3) On ServerC, service mysql stop Step 4) Copy /etc/my.cnf from ServerB to ServerC Step 5) On ServerC, change server_id to a value ...


1

The complete script below can be dropped into a file that we will call "install.sh" and executed by doing the following: touch install.sh # Create empty file chmod 700 install.sh # Make executable nano install.sh # Copy contents into script here ./install.sh # Run it Regarding the script below: Remember to set MYSQL_ROOT_PASSWORD by ...


1

Probably this might help others. adduser mysql chown mysql:mysql -R /var/lib/mysql sudo chmod -R 755 /var/lib/mysql/ sudo service mysql start


0

For mysql tuning You can start with http://mysqltuner.com/ (You can post output here). For wordpress I suggest using some caching plugin like W3 Total Cache with memcached backend and enabling all the caches You can. Object cache should help with mysql load. With mysql removing lot's of data running mysqlcheck -Ao might also help. Also if mysql queries ...


1

I'd first take a look at your app code and the queries you are generating. Using "SHOW PROCESSLIST" will show you the mysql processes and state. If you see queries with full table scans, file sorts, or copy-to-tmp, you'll want to use "EXPLAIN [sql statements] .. " and see where you can optimize. I would venture a guess only, as a result of the limited info ...


0

replace one jpg url to another url in my local server Wouldn't it be simpler to just write your own: #!/usr/bin/perl $| = 1; while (<>) { @line = split; $_ = $line[0]; s/www\.example\.com\/one\.jpg/www.example.com\/other.jpg/g; print $_ . "\n"; }


2

You did not specified the vdisk cache type, so libvirt is assuming the most safest cache scheme: directsync, which imply that all writes are immediately synched to the physical disk. Such restrictive cache type is generally overkill for modern, cache-aware application, which uses write barriers by themselves to ensure important writes are synched to disk. ...


0

I think the problem is that you're selecting your endpoint from mailbox, not from the virtual users table, so postfix knows where it should go, but not dovecot. Change : SELECT username as user, password, '/var/mail/%d/%n' as userdb_home, 'maildir:/var/mail/%d/%n' as userdb_mail, 5000 as userdb_uid, 5000 as userdb_gid FROM mailbox WHERE username = '%...


3

You can use -W option when creating the array. From the manual: -W, --write-mostly subsequent devices listed in a --build, --create, or --add com‐ mand will be flagged as 'write-mostly'. This is valid for RAID1 only and means that the 'md' driver will avoid reading from these devices if at all ...


0

Looks like it was a problem with HHVM, and not Laravel or RDS/MySQL. I installed PHP 7 instead, and now it works. Strange...


0

There are 3 types of MySQL/MariaDB logs: log_error for the error message log; general_log_file for the general query log file (if enabled by general_log); slow_query_log_file for the slow query log file (if enabled by slow_query_log); Check the settings and location of above logs by this shell command: mysql -se "SHOW VARIABLES" | grep -e log_error -e ...


6

This is an HP ProLiant server running with a Smart Array RAID controller without a Flash-backed cache module. As a result, you have no write cache (or read cache), and operations like snapshots of virtual machines will suffer. You've experienced the effect of this. The current configuration is unsuitable for most workloads, especially virtualization. Your ...


0

Answering my own question from research. (I will only accept my own answer if one of these approaches actually works and it's before someone else's suggestion.) This (older) article WHAT ARE THE DANGERS OF SNAPSHOTS AND HOW TO AVOID? mentions a few possible causes and three preventative measures. Interestingly it mentions how the issue similarly affects MS ...


1

Run mysqld --help and check, if it reports any problems with config Check logs in /var/log/mysql Try runnig it directly and check errors: mkdir /var/run/mysqld/ chown mysql: /var/run/mysqld/ mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --socket=/var/run/mysqld/mysqld.sock


0

Answering my own question. On this page: https://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/updating-yum-repo.html The explicitly state: By default, the MySQL Yum repository updates MySQL to the latest version in the release series you have chosen during installation (see Selecting a Release Series for details), which means, for example, a 5.6.x ...


0

I managed to solve the problem, and I think that the way I've gone through may be helpful to others. Check the latency between the servers using ping, mtr and traceroute to find out if the problem is latency related Check the server's load and free RAM, using top (or htop) and free -m Run heavy query on both mysql servers (old local and the new remote) and ...


1

A Few Things I will recommend: Verify if the website is utilizing Memcached/APC/opcode caching. I would recommend Memcached for DB query caching. Do a few tweaks on Mysql configuration using mysqltuner.pl Optimize memcached apc configuration Memcached configuration file location in Debian/Ubuntu based OS: /etc/memcached.conf Memcached Configuration ...


2

They changed the MySQL package so that the bind parameter is in /etc/mysql/mysql.conf.d/mysqld.cnf now. Please change the bind parameter there and remove anything you placed in /etc/mysql/conf.d/mysql.cnf.



Top 50 recent answers are included