Tag Info

Hot answers tagged

3

Open terminal and edit /etc/mysql/my.cnf sudo nano /etc/mysql/my.cnf Underneath the [mysqld] section.add: lower_case_table_names = 1 Restart mysql sudo /etc/init.d/mysql restart Then check it here: mysqladmin -u root -p variables


3

In think your problem is that gourmet_id is declared as CHARACTER(30). If you change it to CHARACTER VARYING(30), it should work much faster. This is what happens: -> Seq Scan on counters c (cost=0.00..250342.85 rows=2725633 width=16) (actual time=0.009..1610.743 rows=2751732 loops=1) Filter: ((counter_name)::text = 'FnfHit'::text) Rows Removed by ...


3

When you reboot the OS you remove all of the disk reads that have previously put into operating system disk cache (RAM). Once you've rebooted, the operating system will have to read the MySQL data from disk, which is several orders of magnitude slower than reading from cache (RAM). Optimise "fixes" this as it causes MySQL to read all of the table data from ...


3

I highly recommend that you do not run GRANT ALL PRIVILEGES ON *.* TO 'username'@'%'; This user has the SHUTDOWN privilege, which can allow the user shutdown mysql remotely with mysqladmin -hIP_of_DB Server -uusername -p shutdown You also do not want the SUPER privilege given remotely to just anyone. Why ? The SUPER privilege enables an account to ...


3

You seem to expect that rows with NULL values are excluded from a B-tree index automatically, but that's not the case. Those are indexed as well and can be searched for. However, since: access_type ... is null in 90% of cases that's hardly useful in your case. Such common values hardly ever make sense in an index to begin with, be it NULL or any other ...


2

What you have seems fine. I would add the following Run this on the Master. SET GLOBAL innodb_fast_shutdown = 0; SET GLOBAL sync_binlog = 1; SET GLOBAL sync_master_info = 1; This will cause everything that has been uncommitted to be committed on shutdown. Then, it flushes the binlogs to disk. On the Slaves, run this SET GLOBAL innodb_fast_shutdown = ...


2

I think there are two unrelated problems here: 1) failure to connect on Unix domain socket This part of ps output: /opt/PostgreSQL/9.3/bin/postgres -D /home/dev/postgres_data indicates that you're not running postgresql as packaged for Ubuntu. Ubuntu doesn't install its binaries inside /opt (it doesn't even create /opt) and your data directory ...


2

I have been asking the same question for several months and have also been unable to find a clear answer on the internet. Perhaps that means that I'm more concerned than I should be; perhaps I should not be doing database server maintenance... So I was forced to do this yesterday, and everything worked well. This is how I went about it: I upgraded the ...


2

Option 1: remove createdb for 9.1 When in doubt, use dpkg -S to learn which packages provide a certain command. Example: $ dpkg -S createdb postgresql-doc-9.1: /usr/share/doc/postgresql-doc-9.1/html/tutorial-createdb.html postgresql-doc-9.1: /usr/share/doc/postgresql-doc-9.1/html/app-createdb.html postgresql-client-9.1: ...


1

If you suspect there's something wrong with our database (cluster), make a copy of your database directory before you continue. Just to be sure. On Ubuntu the default directory would be: /var/lib/postgresql/9.3/main/ - but your installation may differ. Actually, your command should work (in default Ubuntu installations), because the service command starts ...


1

Solution to your problem is below :- On line 115 there is a line that says removeIO Add this after removeIO: # Remove annoying warning message since MySQL 5.6 if [[ -s "$log_errfile" ]]; then sedtmpfile="/tmp/$(basename $0).$$.tmp" grep -v "Warning: Using a password on the command line interface can be insecure." "$log_errfile" > $sedtmpfile mv ...


1

I suspect you had MongoDB 2.4 installed previously. In MongoDB 2.4 the service was called mongodb and used /etc/mongodb.conf (ref: Install MongoDB 2.4 on Ubuntu). With MongoDB 2.6 there was an attempt to have more standard package names across Linux distributions, so the service was renamed to mongod (to reflect the actual daemon being started) and the ...


1

As we can see here all the required packages are rightly updated in the official repository. To solve the problem you can find a good start point here.


1

It turns out that I was putting my pidfile in /var/run which is fine for running it but when server is rebooted the file is deleted and pgbouncer can't find the file and it gives the this error FATAL @src/main.c:553 in function write_pidfile(): /var/run/pgbouncer/pgbouncer.pid: No such file or directory So simply moving the file to another location and ...


1

Use the maxmemory to set a limit to how much your Redis database can grow too. Failing to do so, Redis will grow until the OS will kill it once memory is exhausted (per your current experience). The usage of maxmemory should be coupled with maxmemory-policy - you can choose from different eviction policies depending on your use case's requirements. For ...


1

I decided to go the route of a fresh install. So instead of trying to figure out what postgresql-command will shut down the server I used: sudo apt-get purge postgresql-9.1 and: sudo apt-get purge postgresql-9.3 A fresh install might be an easier solution to some of my other problems I had since upgrading to Ubuntu 14.04. I found this at: ...


1

I found a temporary solution to my problem. I edited the pg_hba.conf of the 9.3 server to say trust in the first two active lines. And after restarting (sudo service postgresql restart) I can connect to the server again using pgadmin. The downside is that the server might now not be password protected (I will open a separate question if I encounter any ...


1

If you do not need all versions of postgresql installed at the same time I would recommend you uninstall them all and then perform a clean installation of PostgreSQL 9.3, postGIS 2.1 and pgAdmin 1.18 and all related packages. After you should have no problem to associate PostGIS as extension to any PostgreSQL scheme


1

But that is 9.1. - Is pgadmin connected to the wrong postgresql? Yes. It appears that you're connected to your 9.1 server, suggesting that 9.1 is still running. Do pg_lsclusters to see what PostgreSQL installs you have and their status. Each runs on a different port. If you want to connect to 9.3 you need to check what port it runs on and connect ...


1

Put the following parameters in your my.cnf and then restart the service:- skip-name-resolve log-warnings=1 The above activity will solve your issue. Try to check this link also:- http://serverfault.com/questions/341290/mysql-warning-ip-address-could-not-be-resolved


1

SQL server has some special optimizations for count(*) that postgres does not have so the test may be invalid. I would benchmark the time it takes for the full set from the application point of view. Another fair test would be the time it takes to insert into a scratch table (via INSERT /SELECT)


1

How do I avoid sort in the explain result? Actuall I didn't ask any sort in the SQL Statement. You've asked for rows to be aggregated. One way to do this is to sort the data set and then scan it to collapse out duplicates. This can be faster than hash aggregation, which is the other way PostgreSQL knows how to do grouping. So while you didn't ...


1

You should be able to easily install on most (if not all) flavours of x86-based Linux distributions. There are officially packaged versions for: Ubuntu Debian RPM (Redhat, CentOS, Fedora, Amazon Linux) You can also install from tarball, or check if there are packages available in the "ports" equivalent for your distribution.


1

Yes, this is normal. Linux will use any free memory if needed for cache and buffers - it will be reallocated if needed for anything else (i.e. stating a new program, an existing program needing more memory for something, caching more recently accessed information, or the hypervisor requesting some memory back by inflating the local balloon if you VM is setup ...


1

You need to visit the MySQL download page. Select your preferred platform (I prefer Debian Linux). And then select your OS-type (32-bit or 64-bit). Click on the Download button. It will ask if you want to Sign Up or Login, just choose the No thanks, just start my download. If you are downloading the .deb file on the terminal right click the link and choose ...


1

Dunno if it was true when you wrote your question, but the puppetlabs/postgresql module does some pretty clever stuff with versions that are not standard for your OS distro, including installing the required repository. Snippets from my config: In one of my puppet classes I call: class { 'postgresql::globals': encoding => ...


1

Please note that there are typos in the instructions. The install lines are missing an 'l' in two places (postgresql instead of postgresq). So the last two commands should be: # Install PostgreSQL apt-get install "postgresql-${PG_VERSION}" # (Optional) Install PostgreSQL Contrib Modules apt-get install "postgresql-contrib-${PG_VERSION}"


1

In Feb 2009, Scahin_S wrote in [1] to use the uninstall-postgresql binary. In the same thread Sachin_S also documented a manual alternative for uninstalling 8.3 is /opt/PostgreSQL/8.3/installer/server/removeshortcuts.sh /opt/PostgreSQL/8.3 8.3 /etc/init.d postgresql-8.3 stop rm -rf /opt/PostgreSQL rm /etc/postgres-reg.ini rm -rf ...



Only top voted, non community-wiki answers of a minimum length are eligible