PostgreSQL - FATAL: Ident authentication failed for user "myuser" [closed] - database

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I just installed PostGreSQL in my Ubuntu Box, and the first thing I want to do is to create a database. I read the documentation, and it simply says type createdb. Once I typed in that command, PostgreSQL gave me an error: could not connect to database postgres: FATAL: Ident authentication failed for user "myuser". I assume that this is because "myuser" does not have the right administration privileges in the database. Is there an easy way to add that priviliges ?
Thank you.

The postgresql usually creates a default user postgres. You would have entered a password during installation for this user. If you remember you can use it.
Otherwise, you can add an entry in the pg_hba.conf file to enable your localhost to login without any password for psql command.
A sample entry would be
host all all 127.0.0.1/32 trust

Perhaps, create a user first?
http://www.postgresql.org/docs/8.1/static/app-createuser.html

Related

Connecting to sql server named instance using gorm erroring out with invalid character "\\" in host name [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
I am trying to connect to a locally running sql server developer instance from golang using gorm library using the below connection string
"sqlserver://trusted_connection=yes#localhost\MSSQLSERVER02:1443?database=operationsdb"
but getting the below error
parse sqlserver://trusted_connection=yes#US71DX930J\MSSQLSERVER02:1443?database=operationsdb: invalid character "\" in host name
If this is the Go MSSQL driver you're talking about, try using " / " for the named instance instead of a " \ " backslash:
"sqlserver://trusted_connection=yes#localhost/MSSQLSERVER02:1443?database=operationsdb"
https://github.com/denisenkom/go-mssqldb/blob/master/README.md

SQL Server cannot connect via server name [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
Here the condition:
Let's say I have 2 SQL Server 2000 in my network :
sungai (192.168.1.63)
serverpc (192.168.1.200)
One of client PC can not connect to serverpc using "Computer Name" but works fine using IP Adress (ODBC and Query Analyzer), let say this PC as "Problem PC". 20 clients can connect to serverpc using Computer Name, just this "Problem PC" can't. "Problem PC" can connect to sungai using Computer Name and IP. I have checked nslookup and found no result using serverpc in my dns. This network using 2 router with 1 Subnet and Gateway.
I'm so sorry for asking. The problem is with Client PC.
Somehow there is sql server alias with name "serverpc" in this client PC.
I just remove it from "Client Network Utility" => "Alias" and works fine now.

Mirroring configuartion issue [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
The server network address TCP://XXXX(Server Name):5023 can not be
reached or does not exist. Check the network address name and that the
ports for the local and remote endpoints are operational. (.Net
SqlClient Data Provider)
II am getting the above Error while doing mirror configuration.
Below are the steps I did for the Mirroring configuration.
Restored the fullback up to with no recovery option on secondary
server.
I tried restoring the Log backup (Error: RESTORE LOG is terminating
abnormally), hence I skipped the log restore.
I tired configuring the mirroring and got the success message for
mirroring configuration but when I start the mirroring my primary
database shows Primary/Synchronized where as my secondary server
shows in Recovery.
When I check the Sql ports in configuration manager it shows 1433 and
if I check tcp_endpoints it shows 5023.
Can you please help me to fix the Mirroring configuration.
I have tried Creating ENDPOINTS as-well and while creating PARTNER from Server A to B it is success but when i create partner from B to A it fails. I used below command:
ALTER DATABASE DBName
SET PARTNER ='TCP://XXX(Ip address):5023'

Frontend tool to manage H2 database [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
How to use H2 database's integrated managment frontend?
For operations such as create table, alter table, add column, and so on.
I like SQuirreL SQL Client, and NetBeans is very useful; but more often, I just fire up the built-in org.h2.tools.Server and browse port 8082:
$ java -cp /opt/h2/bin/h2.jar org.h2.tools.Server -help
Starts the H2 Console (web-) server, TCP, and PG server.
Usage: java org.h2.tools.Server
When running without options, -tcp, -web, -browser and -pg are started.
Options are case sensitive. Supported options are:
[-help] or [-?] Print the list of options
[-web] Start the web server with the H2 Console
[-webAllowOthers] Allow other computers to connect - see below
[-webPort ] The port (default: 8082)
[-webSSL] Use encrypted (HTTPS) connections
[-browser] Start a browser and open a page to connect to the web server
[-tcp] Start the TCP server
[-tcpAllowOthers] Allow other computers to connect - see below
[-tcpPort ] The port (default: 9092)
[-tcpSSL] Use encrypted (SSL) connections
[-tcpPassword ] The password for shutting down a TCP server
[-tcpShutdown ""] Stop the TCP server; example: tcp://localhost:9094
[-tcpShutdownForce] Do not wait until all connections are closed
[-pg] Start the PG server
[-pgAllowOthers] Allow other computers to connect - see below
[-pgPort ] The port (default: 5435)
[-baseDir ] The base directory for H2 databases; for all servers
[-ifExists] Only existing databases may be opened; for all servers
[-trace] Print additional trace information; for all servers
How about the H2 console application?
I use sql-workbench for working with H2 and any other DBMS I have to deal with and it makes me smile :-)
I would like to suggest DBEAVER .it is based on eclipse and supports better data handling
one discuss found here
quote from Thomas Mueller:
http://www.dbsolo.com/
http://www.minq.se/products/dbvis/
http://executequery.org/index.jsp
http://sqldeveloper.solyp.com/index.html
http://sql-workbench.net/index.html
http://www.squirrelsql.org/
There's a shell client built in too which is handy.
java -cp h2*.jar org.h2.tools.Shell
http://opensource-soa.blogspot.com.au/2009/03/how-to-use-h2-shell.html
$ java -cp h2.jar org.h2.tools.Shell -help
Interactive command line tool to access a database using JDBC.
Usage: java org.h2.tools.Shell <options>
Options are case sensitive. Supported options are:
[-help] or [-?] Print the list of options
[-url "<url>"] The database URL (jdbc:h2:...)
[-user <user>] The user name
[-password <pwd>] The password
[-driver <class>] The JDBC driver class to use (not required in most cases)
[-sql "<statements>"] Execute the SQL statements and exit
[-properties "<dir>"] Load the server properties from this directory
If special characters don't work as expected, you may need to use
-Dfile.encoding=UTF-8 (Mac OS X) or CP850 (Windows).
See also http://h2database.com/javadoc/org/h2/tools/Shell.html
I haven't used it, but RazorSQL looks pretty good.
If you are running it as an embedded database in spring I use the following configuration to enable the built in web client when the main app is running:
<!-- Run H2 web server within application that will access the same in-memory database -->
<bean id="h2Server" class="org.h2.tools.Server" factory-method="createTcpServer" init-method="start" destroy-method="stop" depends-on="h2WebServer">
<constructor-arg value="-tcp,-tcpAllowOthers,-tcpPort,9092"/>
</bean>
<bean id="h2WebServer" class="org.h2.tools.Server" factory-method="createWebServer" init-method="start" destroy-method="stop">
<constructor-arg value="-web,-webAllowOthers,-webPort,8082"/>
</bean>
I use DbVisualizer a lot for H2-db administration.
There exists a free version:
https://www.dbvis.com/download/
I would suggest Jetbrain's IDE: DataGrip https://www.jetbrains.com/datagrip/

How to rdc to a particular machine that is member of a TS Farm? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I created a Terminal Services farm comprising of 3 TS hosts (say, TS1, TS2 and TS3) running Windows 2008 R2 Enterprise, a TS Connection broker and a TS Gateway for the purpose of hosting a windows application as a TS RemoteApp. The setup works just fine. Now, I want to do some further configuration changes on a particular TS host, say TS2 and not on any other TS host. I try to rdc to TS2 but I find myself getting connected to a randomly chosen TS host (sometimes TS1, sometimes TS2, and at other times, TS3). I think rdc connection is also going via the Connection Broker that is forwarding me to a TS host it decides is best. Is there a way I can deterministically connect to a particular TS host using rdc? I don't have option to login locally on a TS host as the entire setup is hosted in a remote data center. I think this is a very common scenario and must have a straight forward solution. It could be as easy as doing rdc to Connection Broker server and disabling it for a while, but I don't know how to do that too. Any help will be highly appreciated.
Figured it out...
One can use mstsc /console, or on more recent client versions use mstsc /admin to deterministically rdc to a particular member of a load balanced TS Farm.

Resources