# How to create a new user in pure sql

**URL:** <https://meta.discourse.org/t/how-to-create-a-new-user-in-pure-sql/136525>\
**Category:** Migration\
**Created:** [December 19, 2019, 5:15pm UTC](https://meta.discourse.org/t/how-to-create-a-new-user-in-pure-sql/136525 "2019-12-19T17:15:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [December 19, 2019, 5:48pm UTC](https://meta.discourse.org/t/how-to-create-a-new-user-in-pure-sql/136525/2 "2019-12-19T17:48:52Z")

</div>

> [@paultaylor](#):
>
> ow I expect someone will say this is not the right ways to do things,

Right!

> [@paultaylor](#):
>
> and I understand that,

If you did, you’d not be asking. 😉

The likelihood that you’ll end up with a corrupt database is pretty high. And then no one will be able to help you.

Dump your database and restore on your local Discourse server (or anywhere that it can connect to–I’ve done larger imports with a remote database over my home internet connection) and then run the existing script.

> [@paultaylor](#):
>
> dont understand Ruby on Rails so I cant modify the existing scripts, but I do understand SQL

It’ll be much easier to use Ruby that you don’t understand than to understand it well enough to figure out how to write the SQL. I learned Ruby a long time after I wrote my first importer.

---

_[View the full topic](https://meta.discourse.org/t/how-to-create-a-new-user-in-pure-sql/136525)._
