Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

A command line is a string given to a command interpreter that tells it actions to take, such as running programs or copying files. The interpreter processes command lines with escapes and substitutions.

1
vote
1answer
18 views

How to tell whether mysql was built with libedit or readline?

How to tell whether mysql was built with libedit or readline? I'm trying to configure the mysql client tool to use Ctrl-R for searching command history but not sure which input library my ...
0
votes
2answers
121 views

how to stop OracleRemExecServiceV2 from cmd?

I have Oracle 12c running on Windows 7. When I look at the Oracle's specific services (Control Panel\System and Security\Administrative Tools\Services), I have the following 6 services: So far, ...
3
votes
1answer
128 views

How do I force windows to use a specific version of SQLCMD?

I have several versions of SSMS installed on my machine. We have legacy servers running several versions of SQL Server, mainly 2008, 2012, and 2014. I use SQLCMD all the time, but it seems to default ...
1
vote
1answer
118 views

How to format the output of SQL queries on SQLCMD for SQL Server 2017 on RHEL Linux 7.3?

I have installed SQL Server 2017 on RHEL Linux 7.3, and using SQLCMD utility for querying the SQL Server. When I try to query for example: 'SELECT * FROM SYS.DATABASES'. I get output like the ...
0
votes
1answer
37 views

How to get useful error information from mysql command?

I'm trying to script the creation of a database with tables. I'm encountering errors but the error messages are not helpful to me because I'm a novice. I'm finding the mysql tool is providing mostly ...
0
votes
1answer
81 views

How to deploy install of MS SQL Server 2017 Developer Edition via command-line script - not working

I'm trying to deploy MS SQL Server 2017 Developer Edition via command-line script from a server share that holds the install media onto Windows 10 1803 (June release). However, I'm not having much ...
0
votes
1answer
8 views

Show cassandra help documentation in terminal instead of browser

I've just started playing around with Cassandra through the cqlsh cli. When using the help command for the topics the documentation opens in the browser. Is there a way to show the documentation in ...
0
votes
1answer
25 views

mysql (5.5.) cmd unresponsive when selecting a huge db

I had initiated on Friday night a huge (~800G) dump from my machine to a remote host; Today, (although the command does not seem to have returned yet), I am able to log in to the machine and mysql ...
0
votes
1answer
41 views

How to prevent informational messages from getting written when query results are output to a file

When I am running the below query as a batch file (.BAT) using the Windows Task Scheduler, I am getting some informative messages in the output file DatabaseNames.txt in addition to the database names....
1
vote
3answers
1k views

How to prevent asking for password when creating new database in PostgreSQL 10?

I use the following batch file to create a new database in PostgreSQL 10. echo off cd "C:\Program Files (x86)\PostgreSQL\10\bin" createdb -h localhost -p 5432 -U postgres myDB But it asks to enter ...
0
votes
1answer
2k views

How to create a new database in PostgreSQL 10 in Windows from batch file?

I am creating a batch file to create a new database in PostgreSQL 10. I used the following code, echo off cd "C:\Program Files (x86)\PostgreSQL\10\bin" psql "dbname=myDB host=localhost user=postgres ...
0
votes
1answer
1k views

`“C:\xampp\mysql\bin”' is not recognized as an internal or external command,operable program or batch file [closed]

I am trying to access to mysql from windows command prompt by this command: "C:\xampp\mysql\bin" mysql -u root - p But it sayas: `"C:\xampp\mysql\bin"' is not recognized as an internal or ...
0
votes
1answer
949 views

How to grant all privileges to a user from root user in MySQL on command line

I want to execute a command as root to grant privileges to a certain user to a certain "empty" database. I have tried many attempts and cannot get the syntax to work: mysql --host=localhost --user=...
0
votes
1answer
111 views

sqlite3 - table_info looks messy

I created a new database by using the command line binary on Suse. After activating headers by using .headers ON it still looks messy when getting table information with PRAGMA table_info(TABLE1);: ...
5
votes
2answers
2k views

How do you write to a folder with spaces in it?

I've got a bunch of simple SSIS packages that output SQL data to excel, then I rename the files and move them out to the end user. Some of them use file paths with spaces in them, and they aren't ...
-1
votes
1answer
78 views

SQLITE3 Commandline Tool SQL UPDATE Query syntax problem

I have two databases with identical table structures Dest.db = main Source.db = src the table is called colorramp structure of colorramp is ID | name | xml | favorite main.colorramp needs ...
4
votes
3answers
620 views

How do I test if MySQL “require secure transport” is working?

I activated the checkbox named "require secure transport" in the options file, found in the MySQL Workbench. How do I know if MySQL "require secure transport" is working? Should I use command line at ...
1
vote
1answer
334 views

CREATE USER when user already exists

I use this code to create a user: CREATE USER "${domain}"@"localhost" IDENTIFIED BY "${dbuserp}"; CREATE DATABASE ${domain}; GRANT ALL PRIVILEGES ON ${domain}.* TO "${domain}"@"localhost"; But what ...
0
votes
1answer
139 views

Interrupting query sends wrong thread ID

In the MySQL command line client (Linux) when I kill a query by pressing CTRL+c this usually works fine. mysql (slave) > select sleep(5); ^CCtrl-C -- sending "KILL QUERY 117920686" to server ... ...
1
vote
1answer
185 views

Missing commands in MySQL command line history

Why aren't all command that are entered in the MySQL command line saved in the command history? For example, entering the commands DROP DATABASE mydb; CREATE DATABASE mydb DEFAULT CHARACTER SET utf8;...
1
vote
0answers
710 views

All instances upgrade from Command Prompt

I want to create a cmd script to upgrade sql servers in the organization(mostly 2014) to 2016. I've read Microsoft documentation Install SQL Server 2016 from the Command Prompt regarding this issue. ...
0
votes
2answers
233 views

Import error from mysql command line

I tried so many ways to restore a sample database (with the command on top of the picture) but i failed every single time. i successfully restored with this command in past. but now i am facing this ...
0
votes
0answers
280 views

Is there any way to set the alias for command permanently in PostgreSQL?

I'm trying to set the alias for command permanently in PostgreSQL. I've set the alias for a command like given below. Test=> \set x '\\! reset' So, the alias has set for reset the terminal. While ...
1
vote
0answers
450 views

Install SQL Server 2014 without SQL Server 2012 Native Client Tools

I am trying to install SQL 2014 through command line (via my installer setup to be precise). Below is the INSTALL Command I use for a silent Installation of my SQL Server. InstallCommand="/ACTION=...
1
vote
0answers
22 views

Can you get the “CREATE” statement for a domain in PostgreSQL?

In PostgreSQL, for many objects like functions (among other things), there exists a way to get the CREATE command for that specific object (with functions you can use pg_get_functiondef(oid), for ...
1
vote
1answer
937 views

Is there a way to set bind_address from command line in mysql 5.5 without restarting?

I made a modification to bind_address in my.cnf that knocked down a monitor. It has been repaired since, firewall allowing the monitor IP in. However, mysql is still running in its previous state ...
2
votes
1answer
439 views

How can I detect the use of SQL Server replication on a server (all versions) preferably using PS or CMD

I am trying to find a way to detect if a customer has SQL Server replication on. This helps decide whether they can use Express (as they frequently request) and this is one of the blocking factors. ...
1
vote
1answer
2k views

Export .MWB to working .SQL file using command line

We recently installed a server dedicated to unit tests, which deploys updates automatically via Jenkins when commits are done, and sends mails when a regression is noticed > This requires our ...
1
vote
2answers
332 views

Teach MySQL cli autocomplete to only list table names, not field names?

When starting to write a MySQL query, e.g. describe myt and hitting TAB, MySQL autocomplete will list not just the table names starting with myt (e.g. mytable), but all fields/columns of each matching ...
4
votes
1answer
881 views

Mongodb incremental oplog Dump not working

I am not able to take an incremental oplog dump. I am not getting any error messages the connection happens fine and also there is a operation recorded(shows up in db.currentOp()), but still nothing ...
0
votes
1answer
582 views

connect to psql and run SQL command from command line

I'm trying to write a quick line in bash that will use psql to connect to a database and delete all entries in two tables: \connect some_db DELETE from some_table DELETE from another_table I'd like ...
0
votes
0answers
314 views

Is there anyway to check what is the PostgreSQL data directory programatically?

I'm doing an installer to my program and I'd like to check if the databases already exists in the computer. I do this in a horrible way, calling psql -lqt | findstr dbname. If someone knows a better ...
0
votes
2answers
3k views

How to run mysqldump from windows command prompt

I'm using non-install version of mysql5.1 on Windows. I have placed "mysql" folder under c:\ and it seems to work fine. But when I try C:\>mysql\bin\mysqldump.exe -u root -p mydatabase > c:\>...
3
votes
1answer
2k views

Portable client tool to connect to SQL Server Express LocalDB and execute a query

I am running out of ideas on this little problem: I need to execute a query on a LocalDB database directly on user's computer. I do not want to install anything there and there is only .NET (4.5.2) ...
0
votes
1answer
3k views

To give a user all privileges except the 'Create user' privilege

My task is simple i want to create a user in MySQL server that has all the privileges but excluding the ability to create other users. I tried to create a user through the root account. then i gave ...
0
votes
2answers
554 views

MySQL Command to Mass Change Specific DB from MyISAM to InnoDB and vice versa?

I have an mu WordPress database and I want to change it from MyISAM to InnoDB to test its performance. Which MySQL command/commands will do it for all of the tables instead of doing manually one by ...
3
votes
1answer
469 views

How to drop user@% on the MySQL CLI?

How to drop 'user'@'%' on the MySQL CLI using the mysql -e command? mysql -uroot -p -e "'myuser'@'%'"; This does not work.
5
votes
1answer
168 views

Getting column information from the MySQL command line

I am trying to get all the columns from MySQL using bash scripting. I want them to be stored in an array. If I write it this way: mysql -uroot -pPassword1 "select column_name from ...
3
votes
1answer
15k views

import CSV into mysql table via command prompt (MySQL 5.6.25)

I'm trying to load CSV's into a mysql database with this command: LOAD DATA LOCAL INFILE '\Users\userName\Downloads\tableName.csv' INTO TABLE tableName FIELDS TERMINATED BY ',' LINES TERMINATED BY ...
2
votes
1answer
5k views

SQLPlus Command Line In-line Set Commands

I have the need to run linux command line direct query, including SET options. The query by itself runs fine. However, when I attempt to add set commands, it fails. (my alias 'db' connects to ...
0
votes
0answers
45 views

Searching & deleting content that starts & ends the same, but has random text in between

So my Wordpress sites been hacked & spuriously created a load of content in the posts which starts with & ends with . The only trouble is that the bit in between is random hyperlinks. Any ...
2
votes
0answers
1k views

how to disable and enable SSIS package using commandline?

I have a scenario where SSIS packages are deployed at the customer's site and they have some data issues. Because of this we are developing new packages to fix the corrupted data. When my new ...
0
votes
1answer
2k views

Passing passwords more securely to mysql utilities on the command line

This question is related to another question I subsequently asked here: Using the output from mysqldiff.exe to transform database2 to match database1. I have been trying to use mysqldiff.exe, part of ...
1
vote
1answer
3k views

Can't insert arabic text into mysql database using mysql prompt

I had a local table with arabic values.when exported i got the following query. DROP TABLE IF EXISTS `type`; CREATE TABLE IF NOT EXISTS `type` ( `bs_id` int(11) NOT NULL AUTO_INCREMENT, `types` ...
0
votes
1answer
9k views

Importing a SQL Dump File through XAMPP's Command Line

A few days ago, I exported a .SQL dump file with all my databases, which is about 150MB. The thing is I cannot import it through phpMyAdmin since the file is way to big. I remembered there was ...
3
votes
1answer
4k views

How to obtain SQL feature list from the command line

Is there a command at the CLI or in PowerShell that will list the components installed for SQL? I'm looking for something like the Feature List you can get from running the discovery report from ...
1
vote
1answer
710 views

Check Oracle Service is Started from Batch Command

Uses: Oracle9i Standard Ed; I have a schedule which performs a Dump Import and afterwards the System Reboots itself, which is happening without any problem. After the System had rebooted, I have ...
0
votes
1answer
914 views

Unable to migrate local database to RDS instance

I recently created an MySQL instance on Amazon RDS. Unfortunately, I'm not able to connect to the instance from the MySQL command line. I will brief you the details. 1) I want to move/migrate my ...
2
votes
1answer
130 views

Difference of write authorization on file system with mySQL

On my local mySQL (on CentOS 6 VM) database I wanted to export some data from the DB to a file like this: SELECT html FROM mytable WHERE lang = 'en' and id='KEY01' INTO OUTFILE 'key01_en.html' By ...
15
votes
1answer
5k views

Is there a psql equivalent of bash's reverse-search-history?

I am very fond of bash's reverse-search-history (C-r) (command-line feature): Search backward starting at the current line and moving ‘up’ through the history as necessary. This is an incremental ...