Why can't I connect to the Database with symfony's propel ORM? - database

I'm building the blog project example shown in the "definitive guide of symfony" (chapter 8: the model) on official webpage.
When i do operations that affects the database (like save();) in symfony, this message appears:
Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access denied for user 'root'#'localhost' (using password: NO)]
I tried to find errors in propel configuration files and nothing found. I just did what the guide says, nothing else. Maybe i need to create by command line the database or something like.

You need to properly configure databases.yml with a valid user and password for your MySQL server. Right now it's trying to connect as the root user with no password, and it appears that's not valid for your local MySQL configuration.

Related

Is it secure to deploy an SSAS Tabular Model package impersonating a specific user?

I created an Analysis Services Tabular Project in Visual Studio.
I tried to set the Impersonation Information to "Current User":
Unfortunately, I get the following error:
Failed to save modifications to the server. Error returned: 'The datasource, '[Datasource Name]', contains an ImpersonationMode that is not supported for processing operations.
If I instead set "Impersonation Information" to "Specific Windows user name and password" and use my personal account, it works just fine.
I got error messages for all other options (other than impersonating a specific account). For example, the "Unattended Account" option gave me the following error:
Failed to save modifications to the server. Error returned: 'An unexpected error occurred (file 'pcsspi.cpp', line 926, function 'GetImpersonationIdentity').
A connection could not be made to the data source with the Name of '[Data Source Name]'.
I do not handle the deployment myself - I move the entire solution to a shared folder and the tech lead for that particular project deploys it.
That being said, are there any security implications for impersonating my account? Any chance I could compromise my credentials?
Its totally fine to impersonate a specific Windows username and password however using your personal account is not correct. Set up a service account that has limited access to just the resources the Tabular model needs for refreshing. (Whatever data sources it uses and nothing else)

connecting database using pymysql in python

I'm still learning how to work with a databases using python libraries
An operational error has occurred while executing the following code
screenshot
Code snippet:
import pymysql
db1=pymysql.connect(host="127.0.0.1",user="root",password='root',port=3306,db='world')
a=db1.cursor()
sql='SELECT * from CITY'
print(a.execute(sql))
Error:
(1045, "Access denied for user 'root'#'localhost' (using password: NO)")
what could be the reason for this?
An operational error has occurred while executing the following code screenshot. what could be the reason for this?
Error in question is:
(1045, "Access denied for user 'root'#'localhost' (using password: NO)")
It reveals that you are attempting to connect without password while you actually supplied one in connection arguments. This was at one point known bug with pymysql so answer can be version dependent. If you can normally connect to mysql with mysql -u root -proot world (database, password and user from your connect arguments) that means that your database is indeed with proper credentials and expects password while connect method is not sending one, most probably due to old version. On the other hand if you can't connect then most probably your root password is blank and you need to set it properly. Also there is option that you have issues with access to database 'world' for root user.

Setup Azure MSSQL Database in Ejabberd server?

I'm developing chat application, I'm using ejabberd for my project. I installed ejabberd server(16.06) successfully and it performing good in auth method as internal. But it is not working when I'm changed auth method as sql. These are the things I'm changed in ejabberd.yml file
default_db: sql
auth_method: sql
## ODBC compatible or MSSQL server:
##
sql_type: mssql
sql_server: "Server=azure_server_name;DSN=DB_Name;UID=azure_DB_username;PWD=azure_DB_password"
sql_pool_size: 10
sql_keepalive_interval: 28800
mod_mam:
iqdisc: one_queue
db_type: sql
default: always
I'm getting following error for while I'm register new user and admin login into web admin portal
ejabberd_auth:is_user_exists:316 The authentication module ejabberd_auth_sql returned an error
when checking user <<"newuser">> in server <<"localhost">>
Error message: {timeout,{p1_fsm,sync_send_event,[<0.390.0>,{sql_cmd,{sql_query,{sql_query,<<"Q9525209">>,#Fun<sql_queries.9.38301790>,#Fun<sql_queries.10.38301790>,#Fun<sql_queries.11.38301790>,{sql_queries,145}}},3534866},60000]}}
I'm used register command:
bin>ejabberdctl register "newuser" "localhost" "password"
Thanks in advance. Please add your ideas and suggestions to resolve this issue.
Again- I am no Ejabberd expert- I imagine someone might have more experience with this; However, it seems that you're confusing Register which I assume is an action to create a login on the Ejabberd platform with the login that is being used on the database. (Or I'm misinterpreting your comments. One of the two.)
You will need to use a username/password combination that exists on the Azure SQL Database in your connection string.
Additionally, you might try the following connection string :
sql_server:"Server=tcp:azure_server_name.database.windows.net;DSN=DB_Name;UID=azure_DB_username;PWD=azure_DB_password"

Where are credentials stored for SSIS data sources?

I'm setting up a development machine in which I need to maintain an SSIS package created by another developer. I can't get the package to run on this new machine, either in Visual Studio or as a SQL Server job. The most helpful message comes from Profiler:
Login failed for user 'MyUserName'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>]
I know what the password should be, but I can't find where to set it.
To debug this, I've tried two ways of modifying the credentials to specify a different user, but the different user name is not being used in the connection attempts.
First I tried modifying the data source properties in Visual Studio.
Then I tried modifying the package config.
Data Source=.\SQL2014;User ID=DifferentUserName;Initial Catalog=dbname;...
The original user name is still being logged in Profiler, so I'm wondering where else to look for the credentials.

Login failed for user 'sa' while trying to create datasource with Railo

So I'm trying to setup Railo and I want to add a datasource.
For the database I'm using Microsoft SQL server Management Studio.
But now I've run into the classical problem: "Login failed for user 'sa'. ClientConnectionId:afd80ac2-0744-4a7d-a9f7-083d93adee0d"
What I've done so far:
With the SQL Server Configuration Manager in the TCP/IP settings I enabled the IPs I had to.
I set the password for the user 'sa' in MSSQL and I added a user mapping for the table I want to use.
I made the user 'sa' the owner of the DB i want to connect to
Restarted the SQL service, my computer and Railo multiple times.
I'm pretty much out of ideas.
After Leigh mentioned in the comments to look at my logs it had the following message: "Login failed for user 'max'. Reason: Failed to open the explicitly specified database 'test'. [CLIENT: 127.0.0.1]"
I then tried to make a connection without mentioning a database and that worked.
I would also point to Leigh's answer here which explains how to turn Mixed-Mode authentication on, as this can also cause this error. Since the cause of this isn't on Railo/Lucee's end, this issue still arises in 2018.
I just don't want a useful answer to get lost to history, nor plagiarize an answer I barely found.

Resources