Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

83

You can do that by following: SELECT grantee, privilege_type FROM information_schema.role_table_grants WHERE table_name='mytable' This gives you this kind of output: mail=# select grantee, privilege_type from information_schema.role_table_grants where table_name='aliases'; grantee | privilege_type --------------+----------------- mailreader | ...


51

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


48

Ubuntu or Debian can run multiple instances of PostgreSQL and provide a specific way to autostart/stop/start each cluster. There should be a file named start.conf inside /etc/postgresql/9.2/main (or more generally /etc/postgresql/<version>/<clustername>) with these self-explanatory contents: # Automatic startup configuration # auto: automatically ...


25

The line in your netstat report shows that the database is only listening on localhost:5432 (127.0.0.1) for incoming tcp connections. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 3561/postgres So it can only accept local tcp connections regardless of what ...


21

These are actually very poor instructions on how to remove the Microsoft SQL Server. SQL Server installs these associated packages. mssql-server mssql-server-fts mssql-tools msodbcsql unixodbc-dev Assuming you wish to totally remove SQL Server, you should # Stop the service systemctl stop mssql-server.service sudo add-apt-repository --remove "$(curl ...


16

In the link that Dimitar provided, the question itself hints at a solution - if you're putting this in a script, you could add the SET PASSWORD line with an empty password. export DEBIAN_FRONTEND=noninteractive sudo debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password password PASS' sudo debconf-set-selections <<< '...


15

Using psql meta-commands: https://www.postgresql.org/docs/current/static/app-psql.html Going over the page with Ctrl+F gives: \ddp [ pattern ] Lists default access privilege settings. \dp [ pattern ] Lists tables, views and sequences with their associated access privileges. \l[+] [ pattern ] List the databases in the server and show .... ...


15

You are on Ubuntu and obviously have Martin Pitt's pg_wrapper installed (judging from pg_ctlcluster) that is provided by the package postgresql-common and comes with the standard Debian packages. I use the same on Debian. On a Linux system, run which in the shell to see which executable is actually picked: postgres@db:~$ which pg_dump /usr/bin/pg_dump ...


14

There are instructions on the pgAdmin site how to install with pip: https://www.pgadmin.org/download/pip4.php But there is no official Debian Package (.deb), yet. A request for packaging is pending: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834129 For now, consider the Postgres Apt repository: https://wiki.postgresql.org/wiki/Apt/FAQ


13

Undercovers psql uses the bellow query when you issue \du command. SELECT r.rolname, r.rolsuper, r.rolinherit, r.rolcreaterole, r.rolcreatedb, r.rolcanlogin, r.rolconnlimit, r.rolvaliduntil, ARRAY(SELECT b.rolname FROM pg_catalog.pg_auth_members m JOIN pg_catalog.pg_roles b ON (m.roleid = b.oid) WHERE m.member = r.oid) as ...


13

2017, May: SQL Server 2017 hasn't been released yet (only previews) so no licensing or pricing is available yet (the name v.Next should have been a clue!). 2017, Dec: SQL Server 2017 for Linux was released in October and the Developer Edition is free for development purposes, as in previous versions.


13

Microsoft says that DMV (ring buffers) doesn't work on SQL Server 2017, only 2019: Sys.dm_os_ring_buffers DMV has been a key DMV used for monitoring SQL Server by built-in tools as well as third party monitoring utilities. When SQL Server 2017 was released on Linux, unfortunately this DMV did not return correct CPU usage information by SQL Server ...


12

SQL Server did not start because the OS did not have 3250MB of memory. Was tracked by below command journalctl -u mssql-server.service -b Nov 30 00:43:21 OraServer sqlservr[4075]: sqlservr: This program requires a machine with at least 3250 megabytes of memory. Memory was added and SQL Server was started: systemctl status mssql-server


10

A (possibly obvious) additional step is become the postgres user, otherwise you may get errors about roles not existing. sudo su - postgres psql -l or psql postgres=> \l


10

According to the MySQL Documentation, the InnoDB Buffer Pool is set to 128MB by default in MySQL 5.5. You can show how much of the InnoDB Buffer Pool is in use and reserved as follows: SELECT BufferPoolUsed BytesUsed, (BufferPoolUsed / power(1024,1)) UsedKB, (BufferPoolUsed / power(1024,2)) UsedMB, (BufferPoolUsed / power(1024,3)) UsedGB, ...


10

If you change lower_case_table_names in a DB with existing tables MySQL > Table doesn't exist. But it does (or it should) can happen. The comment to this answer helped me in this case: I reverted the value, restarted the database, exported the tables, set the value back to 1, restarted the database, re-imported the tables and everything worked again.


10

All you should need is: listen_addresses = '*' and then to modify pg_hba.conf to permit connections from the desired source. This is stated in the comments on the (very old) article you were reading. Try using the main PostgreSQL documentation, or up to date tutorials, in future. See: Connection and authentication settings Client authentication


10

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 ...


10

Turns out the answer was on Stack overflow. And Daniel commented on it right about the time I was installing it. sudo apt-get install postgresql-contrib-9.3 https://stackoverflow.com/a/22833812/147562


10

After two hours, I figured it out. Oracle's documentation for the error didn't seem terribly descriptive at first: ORA-24454: client host name is not set Cause: The network host name in files like /etc/hosts was not set. Action: Set the host name and try again. Now, the command worked on my machine (Ubuntu laptop), but it didn't work on EC2. I ...


9

I see two things wrong here. Oracle tries to open a parameter file in the $ORACLE_HOME/dbs directory with the format "spfile" + $ORACLE_SID + ".ora". If it cannot find it, it then tries to open "init" + $ORACLE_SID + ".ora". This is where the problem(s) are. By virtue of the fact that Oracle is trying to open a parameter file named "initXE.ora", your SID ...


9

When reading the configuration file, the mysql command line client only reads configuration directives found in the [client] and [mysql] sections, while mysqldump only uses configuration directives found in the [client] and [mysqldump] sections. If your socket directive in the config file is in the [mysql] section but not the [mysqldump] section then you ...


9

"no space left on the device" could also mean that the partition is out of inodes. Use df -i to check inode usage. Edit: Each file, directory, and symbolic link requires one inode. So the idea is to remove some files from the / partition. It doesn't matter how large the files are. You can of course just pick some files on the partition and move them to ...


9

pg_ctl by design isn't in the path of the version of PostgreSQL Debian (and therefore Ubuntu) distributes. PostgreSQL is installed as a service in Debian/Ubuntu sudo service postgresql {start|stop|restart|reload|force-reload|status} [version ..] That command calls an init.d script which wraps around pg_ctlcluster. You can see that by opening /etc/init.d/...


9

I performed the same steps and ran into the same problem. I found that the problem was resolved by removing the ~/.pgadmin directory (created during installation) and then re-running "python pgAdmin4.py"


9

Ok, apparently just changing 'BEGIN PRIVATE KEY' to 'BEGIN RSA PRIVATE KEY' isn't enough. It must be properly converted from PKCS#8 to PKCS#1 Reference openssl rsa -in /etc/mysql/ssl/nginx.key -out ~/nginx.key.rsa


9

Seems like the only solution is downgrading: On a Ubuntu server do the following to perform a downgrade to the previous (14.0.3022.28-2) version: systemctl stop mssql-server sudo apt-get install mssql-server=14.0.3022.28-2 systemctl start mssql-server For other linux OS use your package manager or download the package manually from here: https://packages....


8

Memory usage in linux in general and for Postgres in particular is a pretty complex subject, a good starting point is Bruce Momjians blog covering the subject and the usage of smem. It is well worth following the links in Chris Seibenmanns blog on the subject.


8

Are you running from the 10gen repository or from the default Debian/Ubuntu repo? I recommend using the official 10gen repository. Check this link out - [10gen MongoDB How-To Install on Ubuntu:] http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/. It is best to uninstall the previous mongodb installation prior to this change, which will also ...


8

This part is unusual: ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/ This needs to be char-by-char identical every time. I see it ends with a slash here, which is non-standard, and I suspect that you've added it by mistake. Adding a slash will result in "ORACLE not available" in so-called bequeath sqlplus, I've just experimented on my system. Try again ...


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