Tag Info

New answers tagged

0

Task Scheduler is your best bet. But you said you've had "reliability" issues. Maybe the question isn't about what's the best tool, but what issues are you having?


0

Run: sudo apt-get clean and restart MySQL process $ sudo apt-get clean $ sudo /etc/init.d/mysql start


0

Where is it getting "lixxx-yyy.members.linode.com" from? Check you /etc/hosts file. Try: host 127.0.0.1 Expect to see: 1.0.0.127.in-addr.arpa domain name pointer localhost. You can add that host to the hosts table to allow root to connect, or try to have "127.0.0.1" resolve to "localhost" as ...


0

Different versions of MySQL can have different requirements for password storage. Also, its requirements can be affected by the settings in my.cnf. There is a small chance that your password reset is using a format that is not allowed by the my.cnf settings. http://stackoverflow.com/questions/1892607/mysql-password-hashing-method-old-vs-new


1

I think I know what you're getting at. Here's a scenario that could arrive at higher CPU utilization while simultaneously having lower load average. Although in all honestly having CPU at 50% should at least imply a load of 0.5. So something is amiss at a level outside your control. That said, consider the following: 1) The virtual server has a ...


1

You have an opening single quote without a closing single quote. Just type another single quote and either continue typing your query, ending with ; or just type '; Example: mysql> select * from table where name like ' '> '> '> fred';


2

So you can't cluster only 2 nodes.. You need a quorum or you could lose a server and have a split brain then you're not sure which one has what data. You can have 2 data servers and a 3rd voting server that doesn't store data but just a cluster member to cast a vote. What I generally do is have a mysql cluster and have all my clients connect locally to ...


0

Iam not a sql guru, but edit the file and remove the create database command, and change reference to the name to your db name, as for the use command to be sure it reflect your db name


0

On any RPM based OS you can find which package provides MySQL server: yum provides "*bin/mysqld"


3

In RHEL 7, and consequently in CentOS7, the mysql- packages (or most of them, anyway) have been replaced with mariadb- packages due to an upstream rename/fork. Simply yum install mariadb-server mariadb-libs mariadb and you should be okay - the command names themselves are still mostly mysql related.


0

You're never filling $table with any data. You ARE filling $dataset. You echo $DataSet.Tables[0] to screen, but go back to using $table to construct $body. Edit now selects desired columns: $body = $DataSet.Tables[0] | select col1, col2, col3 | convertto-html | out-string Replace col1, col2, col3 with the columns you want shown, omit any column names ...


0

I would think that you could relatively easily achieve this using MySQL-Proxy. You'd have to put together a LUA script that would be able to differentiate your clients (username, DB Name, connecting host), and then log each one to a separate file.


0

Send-MailMessage is expecting a string and $body seems to be an object array. To remove ambiguity define the type of $body by changing to [string]$body =. While ConvertTo-Html should return a string you can check by piping to Get-Member like so: $DataSet.Tables[0] | ConvertTo-html | Get-Member


2

You can use a proxy designed for MySQL, such as MySQL Proxy or MaxScale, to not only load balance your read queries, but also to ensure that writes are directed to the master. From the point of view of the clients, there is only one MySQL connection, which is useful for clients which can't make separate connections for reads and writes.


1

If you ran a repair on the a MyISAM, it should reduce the size of the MYI. Why ? When a mysqldump creates and load a MyISAM table, think of the mechanical steps to make mytable: CREATE TABLE mytable ... LOCK TABLE mytable ... ALTER TABLE mytable DISABLE KEYS; (shuts off updates to non-unique indexes) INSERT INTO ... INSERT INTO ... . . . ALTER TABLE ...


1

looks safe, from the docs: The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL. so if the main process is mysqld, it will have a decent chance to flush everything.


2

I doubt any of the SQL engines is rolling back the updates for days. Usually it's a couple of last transactions. It can roll back a couple of days only in one case - you have like 0.5 transactions per day, and you were lucky enough to get the power outage in the exact moment the transaction was happening. Even if I'm mistaken, besides adding an UPS (the ...


1

I would suggest adding a UPS, and then shutting your services down cleanly based on the "no power" signal.


1

You have to setup port-forwarding via ssh tunnel. While mysql listening on the 127.0.0.1:3306, you have to create the forwarding link: ssh -f user@your-server.tld -L localhost:3306:127.0.0.1:3306 -N Then you can connect to the mysql on the localhost:3306 just like as it was launched on your local machine. All connections to the localhost:3306 will be ...


3

bind-address specifies the local ip address of your mysql server, it doesn't have to do anything with its remote address (where it can be connected from). Your address (starting with 192.168) is a local net address, which means, it can be connected only from your local network. It is a very simple way for a localnet mysql and gateway server to make mysql ...


2

A bit late to the game...but here's a quite comprehensive post I wrote a few months back, detailing the major differences between MYISAM and InnoDB. Grab a cuppa (and maybe a biscuit), and enjoy. The major difference between MyISAM and InnoDB is in referential integrity and transactions. There are also other difference such as locking, rollbacks, and ...


-2

you need to put innodb mysql variables under [mysql] block in my.cnf, otherwise it will not be read


0

I changed my.cnf on SLAVE bind-address=my_server_ip (not lo ip). And I added same user on SLAVE as on MASTER for select on some database like: grant all on db.* ... end so on. Now splitting traffic is working 100% (so far). So issue resolved.


0

Borrowing from this answer: You can append \x\g\x to the query just as you would with MySQL's \G. For example: select * from users \x\g\x This has the effect of enabling expanded display, running the expressed query, and disabling expanded display, all in one statement.


3

No, this is not possible. If you require this extension, you will need to run your own MySQL instances.


-1

If you want to install MySql 5.5 on a CentOS 6 and over-right conflicts in mysql-libs you have to: yum install yum-plugin-replace wget https://mirror.webtatic.com/yum/el6/latest.rpm rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm yum install mysql.`uname -i` yum-plugin-replace yum replace mysql --replace-with mysql55w yum replace mysql-libs ...


0

As far as I know, there is no stock way to do this. In order to determine when the root password changes, you'll need to have binary logging enabled for the mysql database and be watching that log for password changes for the root user. If you don't already have binary logging enabled, I'm not sure there's any way to determine the password age. As far as ...


1

I just had to handle this. Finding the backup In my case, mysql lives in /usr/local/mysql/ (where the last part is actually a symlink to the current installed version of mysql). It actually does correctly back up the files, and the whole structure exists on the backup. But for some reason, even if you navigate to the correct local path in finder, if you ...


1

I have gotten MySQL uninstalled, and reinstalled, which I am still pinching myself about. The solution was simple enough. I am sure I performed these actions somewhere in the blur of trying to figure this out, but for anyone looking for a solution, this is what I did: Purge mysql-server-5.1 and mysql-common. Afterwards, delete /var/lib/mysql /etc/mysql ...


1

If your smtp server (ISPConfig seems to use postfix) wasn't able to accept those mails (i.e., if it needs the mysql connection to store them), it will have answered the requests from the foreign mail servers with an error - you should check your mail server logs as already suggested. In this case the sending mail servers should retry after a while (depending ...


0

The accepted answer (using mysqldump to backup mysql.user table) is a very dangerous approach if you are migrating to a new server version. I did that in the past (migrating users from Mysql 4 to Mysql 5.1), and later I had problems trying to grant or modify privileges to my database users. This happens because mysql.users table structure differs between ...


0

We have some canonical questions about Load-Testing and Capacity Planning How do you do load testing and capacity planning for web sites? How do you do load testing and capacity planning for databases? Can you help me with my capacity planning? Basically, you have to get some monitoring and apply the scientific method.


1

In the my.cnf you need to add the socket path in two places: In the [mysql] and in the ->[client]<- section. Here is a typical global option file: [client] port=3306 socket=/tmp/mysql.sock [mysqld] port=3306 socket=/tmp/mysql.sock


0

If mysql stops working you need to investigate why. There is no reason for it to behave this way. Make sure that you have enough memory and that you allocate swap.


2

The tool that is generally used for this purpose is monit. Digital Ocean has a tutorial about it, which also includes an example on how to keep MySQL running. The short synopsis is: Install monit sudo apt-get install monit Edit the configuration file: sudo nano /etc/monit/monitrc and include the following in it: check process mysqld with pidfile ...


2

The problem is, there are no such settings in my /etc/mysql/my.conf. So add the lines needed to the [mysqld] section of the config file. The default my.cnf file only contains a tiny fraction of the configuration values that are available.


-1

In my case query cache settings should go under [mysqld] group otherwise is all ignored.


0

If Window 1 is performing an operation that locks a table or row that Window 2 needs, then Window 2 will just have to wait until Window 1 releases the lock. The fix is to choose the correct table and transaction type, and design your application to release locks quickly.


8

Yes, it is possible. (I figured this out while writing the question) Install MariaDB in the new Arch system, verify that it works. Do your changes to the /etc/mysql/my.cnf. E.g. innodb_file_per_table. (more of this is out of scope for this question) sudo systemctl stop mysqld. (You want to stop on both servers, but in my case the other was already off) ...


0

To follow up the comment on your question, I'll write down a full answer: The issue is that the default socket is /tmp/mysql.sock with MySQL source, and /var/run/mysqld/mysqld.sock with Debian binaries. The solution is to fix the socket path in /etc/mysql/debian.cnf, by providing the good socket=. Or by keeping it, but then change the one in ...


2

Although an answer has been accepted here, I strongly disgaree that it's the right way to go. Unless you have complex deployment and/or capacity testing requirements, then why are you paying for a server to host your non-production stuff? All you need is a local VM (it's trivial to implement bandwadth, latency and packet loss on a proxy). Even VPs go down. ...


0

Another useful tool is iotop, although its possible that (since this is a VM) that its nothing on your system causing the slowdown but resource consumption on the virtualization host / storage. In addition to the tools already mentioned you might want to have a look at hprof and compare the profiles outside and during a performance incident.


1

Use SQL mode STRICT_ALL_TABLES per http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html#sqlmode_strict_all_tables.


3

I couldn't find this behavior described in the official MySQL documentation A few minutes of looking in the MySQL docs found this: Column values can be given in several ways: If you are not running in strict SQL mode, any column not explicitly given a value is set to its default (explicit or implicit) value. For example, if you specify a column list ...


0

try this: use mysql; delete from mysql where user = "wiki%"; flush privileges; EDIT: this assumes there are no other mysql users whose usernames begin with "wiki"


0

You should definitely check if you can start the mysql server again. The replication setup will sync everything and you will be fine. If one master is down you can only connect to the other one. You may consider using some connection pool with both connections for the app to have a solid failover.


0

The word lenghts there is the minimum word lenghts mysql will use to build it's fulltext search's index. In example 'test' will get indexed, but not 'sex'. That limit the size of your fulltext index. If you want it lower, then like they told you need to set the option and you have to rebuild your table index.


4

If you copy the files from the old HD to the new MySQL datadir MySQL will pick them up and start crash recovery. There is a chance the crash recovery is successful, then you can use MySQL database normally. If crash recovery is unsuccessful try to start MySQL again with innodb_force_recovery=4 option in my.cnf. If MySQL starts you have to dump all databases ...


0

It was a memory problem, I was with some programs consuming a lot of memory. I configure this programs to use less memory and solved the problem with MYSQL. Best regards,


2

Most likely this is due to the MySQL caches / buffer pool being empty after restart, and therefore the first queries go straight to the hard disk. This makes the queries last longer, and therefore connections last longer -> there are more active connections at a time. You can verify this by checking disk I/O when you restart server and when it has been up ...



Top 50 recent answers are included