Not sure if this is the case in dreamhost, but in most hosts, you need to “attach” or “assign” the db user to the db in cpanel. If you ahve not done this, you will get the error you describe.
http://www.wpwhitesecurity.com/wordpress-tutorial/wordpress-database-cpanel/
Related Posts:
- Please explain how WordPress works with MySQL character set and collation at a low level
- Connect to database using wordpress wp-config file
- Accessing two databases
- Custom DB_COLLATE (collation) value not working on fresh install?
- Why can’t I swap a DB in a WP install? [closed]
- Can I have multiple database users within WordPress?
- Error establishing a database connection on Installation
- Moving WP from local server to live, error establishing a db connection
- Connect to a remote database for wordpress in my own hosting server
- Switching Databases in LocalHost
- Localhost to Staging to Development Dynamic WP-CONFIG
- How to share plugin created database tables between two WordPress sites
- Problem migrating to localhost
- Is my way to change WordPress server is correct?
- how to encyrpt DB_PASSWORD in wp-config
- Getting WordPress to work inside a rails 3 application
- Can two domains use the same database?
- WordPress keeps redirecting to localhost
- How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development
- Duplicate database to roll back theme & content changes
- Confused over wp-config.php and ‘database user + database password + name’
- Cloned site not connecting to database – MAMP
- execute custom function on database connection error
- Does WordPress Support Using Named Pipes on the Windows Operating System?
- I have include wp-config, should I add global $wpdb also?
- Can’t Install WordPress (local) Failed to open file wp-includes/wp-db.php
- /var/run/mysqld/mysqld.sock
- DB access blocked when initializing WP externally
- How to use remote db tables in current config? [duplicate]
- Multiple Address In WP-Option Value
- ERROR: “Table Prefix” must not be empty
- Can I connect WordPress website with an external database?
- wp-config was suddenly updated
- What’s the difference between identifying and non-identifying relationships?
- Will it break my site if I delete all transient records in wp_options table?
- Safest way to bulk delete post revisions
- How many users can WordPress handle?
- Automate WordPress Database Upgrade
- How can I migrate from another platform to WordPress (using the same domain) and launch when ready?
- Where are image paths to product category images stored in WordPress database
- What’s the database relationship between a post and its attachments
- how do I determine which image is the featured image in the database
- Prevent changing the length of post_name column on WordPress Update
- Why does dbDelta() not catch MysqlErrors?
- how to transfer wordpress sql/database from local to live
- What causes the “max_user_connections” warning on WordPress frontend?
- Get Database Credentials from within the themes file
- what to do when your WordPress database is too large?
- How does WordPress create its database during installation?
- WordPress DB: options-table –> 32 gzipcompression?
- Having issues with wp_postmeta and wp_usermeta tables too big
- WordPress site uses MyISAM, should I switch to InnoDB necessary?
- WP Database Table to CSV file
- Does WordPress always create unique passwords?
- Uppercase to sentence case for post titles
- How to retrieve and show database table in wordpress dashboard
- Moving to another host; which tables to move in a database
- Merge two WordPress installations into one, and keep posts separated?
- Moving online website to MAMP or dumb idea?
- Storing data for a wordpress plugin
- WordPress database import: Row size too large
- Advanced SELECT query with condtional statements
- How can I (semi) automate a database export and import to a different location?
- Improve performance by removing unnecessary database queries
- Redirecting to old domain after migration website
- Localhost keeps redirecting to live domain
- What does wp_term_taxonomy.parent reference?
- How to get nav_menu_item_id and slug from wp database
- Is there a way to execute a php script outside WordPress?
- How can I restrict php mail() to only send me one email after a db error
- How to delete post comments from the database via SQL statement?
- Why does changing Database Table Prefixes result in loss of content?
- wp_option table error while importing
- What is wrong here? Issue with post_id and meta_value
- Counting post and changing roles in mysql database. Query not code
- How do I use a database in a custom theme?
- Deleting empty meta key values
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- WP 5.5, child themes, customizer and a weird cache issue
- How do you enable scripts on a WordPress installation in Softaculous?
- Inserting data with Geometry field
- Best way to store 1 billion+ posts?
- Export only a part of the database for migration
- Why am I being prompted to reinstall wordpress?
- What’s the easiest way to connect external database and display data on wordpress?
- Character encoding issue – black diamond question marks on imported post excerpts
- update multiple user meta field based on another meta field
- After renaming MySQL database, I can no longer access my Blog page
- Reinstall wordpress/mySQL caused database problem
- Call to a member function insert()
- Options table – where does my values go?
- Copy site on same server?
- Changing database links has no effect
- WordPress can’t fetch the posts from the database after moving to new server [closed]
- why you don’t Implement PDO for access every thing to database
- Restrict users viewing post using age on database [closed]
- Uploaded images not displaying full size preview or inserting into posts
- What’s the cleanest way to transfer WordPress to a new server
- Display custom data based on URL slug
- How to protect my credentials on my clients website