Questions tagged [linux]
A widely-used open-source operating system that is particularly popular on servers.
992
questions
108
votes
6
answers
178k
views
Safest way to perform mysqldump on a live system with active reads and writes?
I'm not sure if this is true but I remember reading if you run the following command in linux
mysqldump -u username -p database_name > backup_db.sql
while reads and writes are being made to a ...
82
votes
4
answers
200k
views
PostgreSQL: Remove password requirement for user postgres
I understand that, upon installation, PostgreSQL has no password for its db root user (postgres):
postgres=# select usename, passwd is null from pg_shadow;
usename | ?column?
----------+----------
...
51
votes
3
answers
183k
views
How to make MySQL table name case insensitive in Ubuntu?
I am using Ubuntu 13.10 and MySQL 5.6 and I know database name and table name are case sensitive in Ubuntu (and some other *nix environments) by default.
Now, I want to make MySQL work as case ...
33
votes
7
answers
47k
views
Does innodb_file_per_table affect mysql performance?
There are many articles exaggerating (IMHO) the need for innodb_file_per_table. I understand that with innodb_file_per_table there should be better control over individual tables, like being able to ...
33
votes
5
answers
98k
views
How to properly kill MySQL?
I have CentOS 64bit with CPanel installed and I use:
service mysql stop
It just keeps ticking periods and never seems like it stops. In the logs it just posts a lot of:
130303 17:42:38 [Warning] /...
29
votes
10
answers
273k
views
How do I access Postgres when I get an error about "/var/run/postgresql/.s.PGSQL.5432"?
I am running Ubuntu 16. I have installed Postgresql. Postgresql used to work, but then I rebooted.
nmap commands show port 5432 is open. Postgres seems to be working correctly:
service ...
27
votes
2
answers
164k
views
Mongo Create a user as admin for any database raise an error
I am trying to create a simple user with the rights permission to access to any database and can do any actions. When I trying to execute the createUser command I got this error:
db.createUser({ user:...
24
votes
3
answers
70k
views
How to reinitialise /var/lib/mysql files?
Due to a mishap I deleted the entire /var/lib/mysql directory. Since the database did not contain anything important, I do not want to go through the hassle of restoring it from an old backup, but ...
24
votes
1
answer
39k
views
What limits the number of connections?
As per https://devcenter.heroku.com/articles/heroku-postgres-legacy-plans the connection limit is 500
As per https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server "Generally, PostgreSQL on ...
23
votes
4
answers
62k
views
Test MySQL credentials from Linux command line?
How do you test MySQL credentials from the command line on a Linux server?
20
votes
4
answers
91k
views
Can I change the SID of an Oracle database?
The Server is Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit
Is there an easy & quick way to change the SIDs of the test databases on the server?
Dropping & recreating of ...
20
votes
3
answers
120k
views
How to connect to SQL Server using sqlcmd on Linux?
I have set up the Microsoft ODBC Driver 13 for SQL Server on an Ubuntu 16.04 machine. I am now trying to test a database connection, that includes both the server name and an instance name.
The ...
19
votes
5
answers
84k
views
Cannot open table mysql/innodb_index_stats [duplicate]
After a fresh install of XAMPP and import from my linux live db that is working to the windows Dev-stage, I started encountering problems with INSERT. Everything else seems to work well.
The errors I ...
19
votes
4
answers
71k
views
Taking MySQL dump from another machine
I have a MySQL db on Machine A and I want to access the mysqldump from machine B.
Both machines are running on Linux and I also have the credentials of both, but I can't access the mysqldump. What ...
17
votes
5
answers
82k
views
Can't create file /var/lib/mysql/user.lower-test
MySQL database has been problem free for a few months. Today when I checked for upgradeable packages using the Synaptic Package Manager it came up with the various MySQL components (-common, -client, ...
15
votes
2
answers
27k
views
How do I disable MySQL on Linux from starting on boot or statup?
After adding MySQL to Ubuntu, it automatically starts up on server boot. I would like it to not start up with the system.
How can I disable it and manually start it?
15
votes
2
answers
42k
views
Table is marked as crashed and should be repaired
I have MySQL and Nagios installed Linux PC (Centos5.5)
I have wrote some script to fetch the data from Nagios to Mysql DB (Exactly fetch data in Table)
The data fetching working properly (confirmed ...
15
votes
1
answer
22k
views
best way to run sql server management studio on linux
I'm using ubuntu 18.04.2 on my desktop and running sql server 2017 from docker.
I want to use sql server management studio to manage the server.
SO far now, I have a windows 7 enterprise with with ...
14
votes
2
answers
100k
views
Enabling LOAD DATA LOCAL INFILE in mysql
LOAD DATA LOCAL INFILE is not enabled by default. Normally, it should be enabled by placing local-infile=1 in my.cnf. But it does not work for all installations. In my experience, it worked for Debian ...
14
votes
9
answers
26k
views
What tools are there for data masking? (MySQL, Linux) [closed]
I'm looking for (ideally free, open-source) data masking tools. Do any such exist?
Note: this related question deals with tools for generating test data, but in this question I'm more interested in ...
14
votes
1
answer
18k
views
How do I totally remove SQL Server 2017 on Ubuntu?
The docs has instructions about how to remove SQL Server. However, this leaves certain packages behind. How can I remove all traces and uninstall SQL Server 2017?
14
votes
3
answers
12k
views
How to convert mysql to postgresql? [closed]
I am desperately looking for a conversion tool to convert a big mysql database to postgresql. I need the tool/script to be:
Free
Works under Linux
Simple to use and not buggy
You actually tried and ...
14
votes
5
answers
63k
views
Cannot output MySQL data to file
I am trying to output the data from an MySQL table to a file but getting permission errors:
$ pwd
/home/dotancohen
$ mkdir in
$ chmod 777 in/
$ mysql -ugs -p
mysql> USE someDatabase;
mysql> ...
13
votes
4
answers
66k
views
Setting root password in fresh mysql 5.7 installation
I am trying to install mysql in a serving having CentOS Linux release 7.2.1511. Take a look to the process installation:
# sudo yum install mysql-server
Output:
Dependencies Resolved
==============...
12
votes
1
answer
4k
views
PostgreSQL Transaction Committing for hours
I'm running into an issue whereby I have two connections from a user to my PostgreSQL server which have been running for about 4 hours and have been in a commit state for quite some time (at least 1 ...
11
votes
4
answers
7k
views
SQL Server on Linux hangs on initial startup, no errors, and no new / updated ErrorLog file
I'm using SQL Server 2017, Release Candidate 2 (RC2) on Linux (Ubuntu 16.04).
When the server starts up, SQL Server usually starts as well. But for some reason, SQL Server won't start anymore. At ...
11
votes
3
answers
102k
views
psql: FATAL: role "postgres" does not exist
Running PostgreSQL server on Void Linux. After installing ran initdb as OS user 'postgres':
[user@host]$ sudo -u postgres -i
$ initdb -D '/var/lib/postgresql/data'
Received output:
creating ...
11
votes
2
answers
15k
views
View Postgresql Memory Usage
I'm running Postgresql on a Ubuntu server and need to be able to monitor its memory usage. Currently I have scripts running in a one-minute cron job that monitor/log various statistics and need to ...
11
votes
1
answer
3k
views
bcp command Incorrect syntax near '�'. Character is actually: "ä"
I have mssql-server and mssql-tools installed on Ubuntu (Linux). When I try to export data with the bcp command using the following command-line:
bcp DBname.dbo.Täble_Name out Täble_Name -c -k -...
11
votes
1
answer
4k
views
Connecting to a local MS SQL Server from a GUI client
I am very new to SQL and database servers. I have recently been using SQL Server Express and accessing my database using SQL Server Management Studio on Windows. I am now trying to achieve a similar ...
10
votes
1
answer
17k
views
Starting PostgreSQL server after a HDD crash results in FAILED STATE
I am using Fedora 15 with PostgreSQL 9.1.4. Fedora crashed recently after which:
An attempt to start the PostgreSQL server :
service postgresql-9.1 start
gives
Starting postgresql-9.1 (via systemctl):...
10
votes
2
answers
1k
views
Is it possible to restore a SQL Server Linux Backup on SQL Server Windows
I am running SQL Server in docker on a mac. I have taken a SQL Server backup from windows and restored it in the mac SQL Server docker instance. Now I want to take a backup from the SQL Server docker ...
9
votes
1
answer
25k
views
What is a SQL Server "GDR"?
Microsoft provides hosts two repos,
https://packages.microsoft.com/repos/mssql-server-2017-gdr-xenial/
https://packages.microsoft.com/repos/mssql-server-2017-xenial/
What does GDR stand for in that ...
9
votes
3
answers
23k
views
mysql multi threading for a single query
I have big db of size 8GB and having 9 million contacts in this db. When we try to retrieve all contacts, it takes nearly 1 or 2 hour (in some cases result in timeout) to retreive all contacts for the ...
9
votes
3
answers
24k
views
issues with encoding and pg_dump/restore between windows and linux
I have a dmp file I have created using pg_dump encoded in WIN1252. What I would like to do is import it using pg_restore to a database on a Linux machine. The problem is that on the windows machine ...
9
votes
2
answers
13k
views
Grant postgres superuser to linux account
On my development (Ubuntu linux) laptop I have a postgres OS account, which owns the Postgres installation.
When I want to perform any postgres activities, create/drop databases etc, I must first su ...
9
votes
2
answers
9k
views
Oracle SQL Developer Textcursor disappearing [closed]
In the Oracle SQL Developer on my manjaro Linux, the blinking cursor in the editor area won't show anymore. I deleted everything of local config files (~/.sqldeveloper/) and reloads the program. At ...
9
votes
4
answers
29k
views
Oracle returns an error ORA-01031: insufficient privileges
Oracle returns an error "ORA-01031: insufficient privileges"
When I run sqlplus / as sysdba but sqlplus sys/oracle123 as sysdba doesn't, why?
Oracle version: Oracle Database 10g Enterprise Edition ...
8
votes
3
answers
9k
views
Unable to start mongodb as a service - Exception; Collection does not have UUID in KVCatalog
I have installed Mongodb 4.2
and when running
sudo service mongod start|restart
It does not start the server and I have the log below in mongod.log file.
Exception in initAndListen: MustDowngrade: ...
8
votes
2
answers
1k
views
Can one of Windows failover cluster nodes run on Linux?
As SQL Server is available for Linux can I configure Clustering on Linux nodes? I mean mixed with Windows - some nodes are on Linux, others on Windows in the same cluster?
8
votes
5
answers
39k
views
Scriptable command line access to SQL-Server from linux [closed]
Does anyone know of a ready made1 command line tool that would allow me to connect from a linux client to a sql-server?
I want to be able to run arbitrary queries, but most of the time I want to be ...
8
votes
2
answers
40k
views
Mysql error 28 no space left on the device
I keep running in to the same problem with mysql with error code 28 which means there is not enough space left on the device.
Now the weird part is that there is enough space, here are some tips i ...
8
votes
2
answers
13k
views
How to check the syntax of pg_hba.conf and other postgresql conf files on ubuntu/debian/linux?
Many times, the postgresql service can't restart after some configuration changes.
Is there any command line tool allowing to check the syntax of pg_hba.conf and other pg *.conf files before ...
8
votes
3
answers
2k
views
What is causing this error: None of the specified replicas for availability group ag1 maps to the instance of SQL Server to which you are connected
I am configuring Always-on for SQL Server 2017 RC1 (14.0.80.90, dated 2017-7-18) for Linux as per https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-availability-group-configure-ha. This ...
8
votes
2
answers
2k
views
High Availability for postgresql
I'm new in PostgreSQL database. Recently our developer needed to do some upgrades in our systems.
Because of that we are planning to implement some method in order to implement database failover.
...
8
votes
2
answers
11k
views
Easy Postgresql master/slave replication with automatic failover on Linux?
I need a reliable SQL DB for our application and have been looking at Postgresql's streaming replication support. It seems that it's not hard to setup master/slave replication and you can use the ...
8
votes
2
answers
14k
views
Setting MySQLDump to keep running in the background after session times out
I'm tryng to set up a new Slave DB by copying another Slave DB. Normally I would simply use MySQLDump to dump the Slave and create a .sql file, then import that into the new database.
However, as our ...
8
votes
1
answer
1k
views
How can a datapump export have its resource usage limited on linux?
Doing an export of a number of users causes high CPU and I/O usage. I can mitigate the effects of the CPU usage using Resource Manager and setting the export session to a low priority group, but how ...
8
votes
1
answer
352
views
initdata: No memory for kernel buffers
I recently upgraded my SQL Server 2017 Developer Edition on RedHat Enterprise Linux 7.6 to SQL Server 2019 CTP 3.0.
The mssql-server service will no longer start. /var/opt/mssql/log/errorlog shows ...
7
votes
2
answers
13k
views
How do you directly modify the system catalogs in SQL Server 2017?
NOTE: I understand the risks involved, and the possibility of destroying a production system by doing this. I'm interested in doing it anyway.
Whenever I try to play with system catalogs, I gets ...